[docs] Style pass on the Ray Sandboxes networking section - #65627
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the readability and structure of the Ray Core Sandboxes documentation, specifically refining the explanations for OCI specification transform functions, network modes, and DNS configuration in locked-down networks. The feedback suggests a minor improvement to the network modes table to clarify that the sandbox mode has no egress by default.
| | `sandbox` | gVisor netstack | untouched | Requires `rootless=False`; runsc doesn't support the sandbox netstack in rootless mode. | | ||
| | `public` | Host egress | Generated from `dns` (default `8.8.8.8`, `1.1.1.1`), mounted read-only | Egress works, but the sandbox inherits nothing from the host's resolver configuration. No internal search domains, resolver addresses, or `ndots` options leak in, and the sandbox config stays portable across clusters. | | ||
| | `host` | Full host network identity | Host's own file, mounted read-only (`dns=` overrides it) | Strictly more permissive than `public`. The sandbox can reach anything the node can reach, including internal networks and node-local services. Use `public` for untrusted code. | | ||
| | `sandbox` | gVisor netstack | untouched | Requires `rootless=False`. runsc doesn't support the sandbox netstack in rootless mode. | |
There was a problem hiding this comment.
To answer your question: yes, network="sandbox" runs gVisor's internal user-space network stack (Netstack). Since Ray Sandboxes do not configure external network interfaces for this mode by default, it has no egress/external connectivity (only loopback). It is isolated like none, but with a full network stack running inside the sandbox. We can clarify this in the table by updating the 'Network access' column to specify that there is no egress by default.
| | `sandbox` | gVisor netstack | untouched | Requires `rootless=False`. runsc doesn't support the sandbox netstack in rootless mode. | | |
| | `sandbox` | gVisor netstack (no egress by default) | untouched | Requires `rootless=False`. runsc doesn't support the sandbox netstack in rootless mode. | |
ronny-anyscale
left a comment
There was a problem hiding this comment.
ignorable nits otherwise, pow
|
|
||
| * **Host mounts**: Mount host directories, read-only datasets, or model weights into the sandbox container. | ||
| * **Namespace or mount details** that the first-class options don't cover. Internet access, DNS, and Linux capabilities no longer need this hook — use `network=`, `dns=`, and `capabilities=` (including `capabilities=[]` to run with none at all; see [Networking and DNS](#networking-and-dns)). The hook remains for advanced network or capability configurations beyond those options. | ||
| * **Namespace and mount details**: Configure namespace or mount behavior that the first-class options don't cover. |
There was a problem hiding this comment.
| * **Namespace and mount details**: Configure namespace or mount behavior that the first-class options don't cover. | |
| * **Namespace and mount details:** Configure namespace or mount behavior that the first-class options don't cover. |
| @@ -193,7 +193,9 @@ For advanced workloads, you might need to configure low-level runtime options su | |||
| The `_oci_spec_transform_fn` callable receives the fully generated OCI specification dictionary. It can mutate the dictionary in place or return a modified one. Common use cases include the following: | |||
|
|
|||
| * **Host mounts**: Mount host directories, read-only datasets, or model weights into the sandbox container. | |||
There was a problem hiding this comment.
| * **Host mounts**: Mount host directories, read-only datasets, or model weights into the sandbox container. | |
| * **Host mounts:** Mount host directories, read-only datasets, or model weights into the sandbox container. |
I have a feeling this list is longer than I see here and these suggestions are wrong for consistency, but here we are.
Follow-up polish on the "Networking and DNS" section added in #65570. Content is unchanged; every edit is a style-guide fix: - Soft-wrap the new prose, which was hard-wrapped at ~72 columns while the rest of the page uses one source line per paragraph. - Split clauses joined by em dashes, semicolons, and a mid-sentence colon into sentences. - Drop bold used for emphasis in a table cell, and promote the "DNS in locked-down networks" bold lead-in to an H3 so it gets a TOC entry and a linkable anchor. - Restore parallel structure in the _oci_spec_transform_fn list, and move the multi-sentence migration guidance out of the bullet into prose after the list. - Recast the noun-phrase lead-in above the network="public" example as a complete sentence. - Replace hedged "Prefer public" with direct advice, and the passive "Anything beyond that can be configured" with an imperative. Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
5041fd0 to
a216a29
Compare
|
The Read the Docs check on this PR is red for a builder-side reason, not for anything in the diff. The build dies with a bare
I rebased onto current master to retrigger, and the fresh build failed the same way at a different document, which is what confirmed the read. Measuring the builder's CPU count, cgroup memory ceiling, peak memory, and OOM counters is up in #65631 so the real cause can be pinned down. As the comments in |
Match the style established in ray-project#65627 for the networking section: soft-wrapped prose, em-dash and semicolon clauses split into separate sentences, and bold list leads. Also document the new append flag on PUT /files and the 409 unschedulable error code. Signed-off-by: xyuzh <xinyzng@gmail.com>
Match the style established in ray-project#65627 for the networking section: soft-wrapped prose, em-dash and semicolon clauses split into separate sentences, and bold list leads. Also document the new append flag on PUT /files and the 409 unschedulable error code. Signed-off-by: xyuzh <xinyzng@gmail.com>
Match the style established in ray-project#65627 for the networking section: soft-wrapped prose, em-dash and semicolon clauses split into separate sentences, and bold list leads. Also document the new append flag on PUT /files and the 409 unschedulable error code. Signed-off-by: xyuzh <xinyzng@gmail.com>
Match the style established in ray-project#65627 for the networking section: soft-wrapped prose, em-dash and semicolon clauses split into separate sentences, and bold list leads. Also document the new append flag on PUT /files and the 409 unschedulable error code. Signed-off-by: xyuzh <xinyzng@gmail.com>
…g section (#65627) (#65734) Cherry-picks the Ray Sandboxes networking-section style pass onto `releases/2.58.0`. Ray Sandboxing (gVisor) ships in 2.58.0 (#64964, #65570, and the initial docs #65503, all already on the release branch). This editorial pass on the networking and DNS section landed on master after the branch cut, so the versioned 2.58.0 docs are missing it. The change is prose-only: it tightens the network-mode table, splits the DNS guidance into its own subsection, and removes recommendation hedging. No behavior or API content changes. Cherry-pick of #65627. --------- Signed-off-by: Douglas Strodtman <douglas@anyscale.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Applies the review feedback from the 2.58.0 cherry-pick (#65734) back to master, so the two don't diverge. The original style pass (#65627) landed on master before that feedback came in. Prose-only, no behavior or API changes: - Drop non-standard trailing equal signs from parameter references: `network=`, `dns=`, and `capabilities=` become `network`, `dns`, and `capabilities`. The real `capabilities=[]` code call is left as-is. - Reword the awkward "where the `public` defaults can't resolve" into "so the default `public` DNS settings can't resolve queries." - Spell out virtual private clouds (VPCs) on first use, matching the existing "virtual machines (VMs)" treatment, and define Open Container Initiative (OCI) at its first prose use. OCI is defined in prose rather than the heading to preserve the `#pass-custom-oci-configurations-to-gvisor` anchor. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <douglas@anyscale.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Description
Style-only follow-up on the "Networking and DNS" section added in #65570. No technical claim changes, and the section's structure and content are the author's; this is polish against the Ray documentation style guide.
I was asked for a docs review on #65570 but it merged before I finished, so the feedback is landing here instead of as suggestions on a merged PR.
What changed
The one pattern worth naming, because it repeats: the new prose was hard-wrapped at roughly 72 columns while the rest of the page uses one source line per paragraph. The guide asks for soft-wrapped prose so diffs stay legible.
Beyond that:
### DNS in locked-down networksinstead of a bold paragraph lead-in. The guide reserves bold for UI elements, admonition lead-ins, and definition lists. As a real heading it also picks up a TOC entry and a linkable anchor. Anoteadmonition would work too if you'd rather it read as an aside.— **recommended for internet access**from thepublicrow's first cell. That's bold for emphasis, and the prose above the table already makes the recommendation._oci_spec_transform_fnlist. The second bullet had lost the**Term**: explanationshape of the first and grown to four sentences, so the migration guidance moves into prose after the list. This also drops "no longer need this hook," which orients a reader who knew the previous behavior rather than one arriving fresh.network="public"example, which was a noun phrase with a colon on the end.publicfor untrusted code" to "Usepublic", and "Anything beyond that can be configured" to "Configure anything beyond that."One question I couldn't answer myself
The
sandboxrow's "Network access" cell reads "gVisor netstack," which says how the mode is implemented but not what the reader gets. Doesnetwork="sandbox"provide egress, or is it isolated likenone? That's what someone scanning the table to pick a mode is asking, and it's the one cell that doesn't answer it. I left the cell alone rather than guess. Happy to add a few words here if you tell me which it is.Related issues
Follows #65570. Related to #64964.
Additional information
DOCKER_DEFAULT_CAPABILITIESis in the sandbox package's__all__, so naming it in the prose above the example is safe.myst_heading_anchors = 4, so the new H3 and the existing#pass-custom-oci-configurations-to-gvisorlink both resolve.Note that no pre-commit hook covers Markdown under
doc/source/, and Vale is scoped to the Ray Data docs and the example gallery, so nothing lints this file automatically. Verified by hand: heading depth tops out at H3, no stacked headings, and both in-page anchors match real headings.