Repository navigation
feat(runtime): add opt-in managed Docker image profiles - #98
Conversation
Merge upstream main b5dab29 and retain the tested Hong Kong host boot, stopped-orphan and ACL recovery fixes. Keep the current runtime artifact pins and PVM backend changes from upstream. Validation: make check-fmt vet test.
Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
Treat omitted and zero restore_concurrency as unlimited. Only positive values enable the per-process Start RPC semaphore, while health waits, request deadlines and cancellation keep their existing semantics. Add TOML-backed regression coverage that holds more than 16 restores for both disabled configurations, and update the checkpoint contract. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
Adapt mount and quota preparation from Tianyu Zhou\u0027s 4ff87a3 while preserving the current filestore validation and parent mount namespace handling. Persist the per-sandbox checkpoint opt-in and require managed artifacts on restore. Co-authored-by: Tianyu Zhou <zhoutianyu1995@gmail.com>
Expose immutable image preparation through a private management socket for trusted node adapters. Share OCI ownership with rootfs and image mount consumers so deleting another sandbox cannot stop a managed ROFS. Keep the default image service unchanged when management is disabled. Document session-pinned preview lifetime and the remaining durable lease and restart-recovery requirements for checkpointed image collections. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
Require a usable root reservation in addition to the managed image upper. Reject insufficient total quotas before creating collection state. Exclude the current authorization allowlist from runtime compatibility, while continuing to authorize each restore against current tenant policy. Cover storage geometry, native filestore reservation, allowlist expansion and revocation with regression tests. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
Use the image manager authentication parser for managed guest preparation. Standard Docker auths files and flat operator credentials now share the same host normalization, with safe errors for absent entries. Cover both file shapes and root Registry URL aliases with regressions. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
Keep unrelated image preparation out of global ownership locks. Preserve per-image acquire/release ordering and independently canceled waiters. Tie Nydus bootstrap, launcher and readiness to the acquire context, join rollback before returning failure, and drain management handlers on close. Delegate bounded digest-verified broker metadata to the existing Registry client with native scoped Bearer transport reuse and refresh. Keep build and pull credentials separate and retain failed cleanup identities. Cover concurrent images, shared references, cancellation, late success, shutdown, token reuse/refresh and metadata validation with regressions. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
Merge sandboxd main through PR inclusionAI#96, retaining its private-root hosts seed and checkpoint compatibility validation. Preserve managed Docker filestore uppers, restore admission and image preparation fixes when resolving the runtime adapter conflicts. Keep the complete pinned runsc bundle unchanged. Format, vet and the full unit suite passed for this combined source before packaging. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Merge main fbe69e5 while retaining managed preparation, restore admission, and rollback ownership. Validate caller mount destinations before managed preparation so invalid or nil mounts cannot allocate host resources. Add five managed-start regression cases alongside the upstream plain-start checks. Formatting, vet, focused tests and the full Go suite pass. Signed-off-by: 月可 <keyang.hu@qq.com>
rcyw
left a comment
There was a problem hiding this comment.
Requesting changes on d2509ab768dca8c82c9bf98ca3d420f0265578f5, compared with main fbe69e566859718414a207fa780b8dab363b9381. The optional Buildx/Compose direction is useful, but default-off profiles do not isolate all of this PR's shared-path changes. I independently reproduced two regressions and identified one additional host-compatibility risk; details are anchored in the inline comments.
Findings and evidence
-
R1 / P1 — one runsc inventory failure prevents all-backend startup. The same startup-isolation probe passes on main and fails on this head with
one runtime inventory failure prevented all-backend startup: list runsc state during startup recovery: temporary runsc inventory failure. No managed profile is needed to trigger this. -
R2 / P2 — enabling the management socket leaks a shared OCI reference through the ordinary image-volume path. A deterministic two-acquire barrier exercises the real
ociMountManagerplusSharedOCIService. Management disabled: PASS. Management enabled: FAIL after both ordinary volume owners release, withall ordinary volume owners deleted but backend unmounts=0, want 1. This is a lifecycle-contract mismatch between the new wrapper and an existing caller. -
R3 / P2 — unconditional
volatilenarrows existing runsc host compatibility. The common staging helper also serves GPU and missing-mount-target Start/Restore paths. Linux v5.9's parser lacks this option and returns EINVAL for unknown options; v5.10 implements it. The pinned gVisor requirement is Linux 5.6+. This is a source-verified compatibility finding, not an older-kernel runtime test result.
Required before merge
-
R1: keep failed runsc reconciliation closed at that backend's admission boundary, preserve tracked state and retry cleanup, while other healthy backends and process readiness remain available. Cover startup List failure, cleanup failure, successful retry and recovery; failed inventory must never become an empty inventory.
-
R2: align existing rootfs/volume acquire/release ownership with the new shared service. Add maintained deterministic concurrent-first-acquire/final-release coverage, including ordinary and management consumers together, cancellation, failed-release retry and both management-enabled/disabled configurations.
-
R3: preserve the previous staging-overlay path when
volatileis unsupported and test supported/unsupported capability handling. If the project intentionally raises its minimum host capability, make that compatibility change explicit and enforce it in preflight before accepting workloads. Existing GPU, ordinary mount-target preparation and Start/Restore behavior must have a defined supported path. -
On the final fixed SHA, rerun
make check-fmt,make vet,make test, relevant race tests and the complete existing runtime CI matrix, retaining the writable/etc/hostsand layered RO/RW/nested-mount C/R regressions. -
Qualify a profile-enabled same-node smoke test on the fixed candidate: cold start, checkpoint, source sandbox deletion and restore, with private writable data/process continuity, retained collection/image ownership and correct final-owner cleanup. Record the actual sandboxd SHA/runtime bundle and configuration. The older deployed
653d4b92cohort and this head's default runtime CI have different validation scopes.
Validation already completed
| Check | Result |
|---|---|
Independent make check-fmt vet test on clean d2509ab, Go 1.27.3 linux/amd64 |
PASS |
Relevant maintained image-manager/runsc/server/sandbox tests under -race |
PASS |
Hosted CI 41788360428 at d2509ab |
15/15 PASS |
Identical R1 probe on fbe69e5 / d2509ab |
PASS / FAIL |
| R2 probe with management disabled / enabled | PASS / FAIL |
| Older-kernel runtime qualification | Not run; R3 is source-verified |
All independent checks and probes used separate review worktrees. The host's unrelated BASH_ENV injection was removed for Go checks. The two new probes use temporary directories and fake runtime/image backends; R2 runs the actual upper manager and new wrapper together. I did not rerun the full native runtime matrix or the managed Compose deployment, and I am not treating the author's earlier deployment results as independent qualification of this head.
Long-term design assessment
Keep the official Buildx/Compose input semantics, shared read-only image content, budgeted private writable layers and whole-sandbox C/R primitives. Keep product-specific profile policy in a clear optional adapter boundary. The documented explicitly enabled, trusted-team, same-node preview is a reasonable scope after the compatibility fixes above. Durable sandbox/snapshot/artifact leases, dependency reconstruction after service restart, safe GC and production tenant isolation remain requirements for stable rollout; they are still deferred by this preview's declared scope.
Self-contained reproduction tests
Place the following files in dedicated checkouts. On the PR head, add both files; on main fbe69e5, add only the startup test. These are temporary review probes, with no production-source modifications.
pkg/sandbox/review_pr98_startup_test.go
package sandbox
import (
"context"
"errors"
"testing"
"time"
svc "github.com/inclusionAI/sandboxd/pkg/runtime"
cmap "github.com/orcaman/concurrent-map/v2"
)
type reviewPR98BrokenInventory struct{ svc.FakeRuntimeHandler }
func (*reviewPR98BrokenInventory) List(context.Context) ([]*svc.State, error) {
return nil, errors.New("temporary runsc inventory failure")
}
func TestReviewPR98StartupPreservesOtherRuntimeAdmission(t *testing.T) {
handlers := cmap.New[svc.Handler]()
handlers.Set("runsc", &reviewPR98BrokenInventory{})
handlers.Set("runc", svc.NewFakeRuntimeHandler())
m, err := NewManager(t.TempDir(), handlers, make(chan bool, 1), nil, 4)
if err != nil {
t.Fatalf("one runtime inventory failure prevented all-backend startup: %v", err)
}
defer m.Stop()
_, polled := m.collectRuntimeStates(50 * time.Millisecond)
if !polled["runc"] || m.RuntimeHealthError("runc") != nil || m.RuntimeHealthError("runsc") == nil {
t.Fatalf("backend isolation lost: polled=%v", polled)
}
}internal/server/review_pr98_image_ownership_test.go
package server
import (
"context"
"sync/atomic"
"testing"
"time"
imageapi "github.com/inclusionAI/sandboxd/pkg/imagemanager/api"
)
type reviewPR98ImageBackend struct {
imageapi.Service
unmounts atomic.Int32
}
func (*reviewPR98ImageBackend) MountOCI(context.Context, *imageapi.OCIMountRequest) (*imageapi.OCIMountResponse, error) {
return &imageapi.OCIMountResponse{MountPath: "/fake/owned/rofs"}, nil
}
func (b *reviewPR98ImageBackend) UmountOCI(*imageapi.OCIUmountRequest) error {
b.unmounts.Add(1)
return nil
}
type reviewPR98AcquireBarrier struct {
imageapi.Service
acquired chan struct{}
release chan struct{}
}
func (b *reviewPR98AcquireBarrier) MountOCI(ctx context.Context, req *imageapi.OCIMountRequest) (*imageapi.OCIMountResponse, error) {
response, err := b.Service.MountOCI(ctx, req)
b.acquired <- struct{}{}
select {
case <-b.release:
return response, err
case <-ctx.Done():
return nil, ctx.Err()
}
}
func TestReviewPR98ConcurrentLegacyImageMountsReleaseFinalOwner(t *testing.T) {
for _, shared := range []bool{false, true} {
t.Run(map[bool]string{false: "management-disabled", true: "management-enabled"}[shared], func(t *testing.T) {
backend := &reviewPR98ImageBackend{}
var service imageapi.Service = backend
if shared {
service = imageapi.NewSharedOCIService(service)
}
barrier := &reviewPR98AcquireBarrier{Service: service, acquired: make(chan struct{}, 2), release: make(chan struct{})}
mounts := newOciMountManager(barrier)
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
done := make(chan error, 2)
for range 2 {
go func() { _, err := mounts.mountOCIWithContext(ctx, "same-image"); done <- err }()
}
for range 2 {
select {
case <-barrier.acquired:
case <-ctx.Done():
t.Fatal("mount acquisitions did not complete")
}
}
close(barrier.release)
for range 2 {
if err := <-done; err != nil {
t.Fatal(err)
}
}
for range 2 {
if err := mounts.unmountOCI("same-image"); err != nil {
t.Fatal(err)
}
}
if got := backend.unmounts.Load(); got != 1 {
t.Fatalf("all ordinary volume owners deleted but backend unmounts=%d, want 1", got)
}
})
}
}PR-head command:
env -u BASH_ENV GOMAXPROCS=8 GOFLAGS=-p=8 \
go test -count=1 -run '^TestReviewPR98' -v ./pkg/sandbox ./internal/serverMain-control command (startup test only):
env -u BASH_ENV GOMAXPROCS=8 GOFLAGS=-p=8 \
go test -count=1 -run '^TestReviewPR98' -v ./pkg/sandboxThe PR-head command fails the two assertions described above; the main startup control and the head's management-disabled subtest pass. Relevant maintained race checks were run separately, excluding these intentionally failing probes:
env -u BASH_ENV GOMAXPROCS=8 GOFLAGS=-p=8 \
go test -race -count=1 \
-run 'Test(Shared|Canceled|Management|Private|Immutable|MissingCached|Metadata|FileBacked|Filestore|Managed|WaitRuntime|RuntimePoll|Bootstrap|StartRejects|RestoreAdmission|RunscRestore|HostBoot)' \
./pkg/imagemanager/... ./pkg/runtime/runsc ./internal/server ./pkg/sandboxKeep failed runsc startup recovery local to that backend's admission and retry orphan cleanup through its bounded single-in-flight inventory lane. A successful list cannot reopen admission before cleanup also succeeds. Serialize the ordinary OCI manager's first acquire and final release per image, using the same cancellation-aware gate as managed image services. Retain ownership after failed release or canceled-acquire rollback so a retry cannot leak a lower reference or unmount a managed consumer's ROFS. Retry disposable staging overlays without volatile only when the kernel returns EINVAL. Preserve the optimized path on supported kernels and return other mount failures. Keep checkpoint persistence policy intact. Add regressions for all three review findings, canceled waiters/leaders, release/acquire races, cleanup retry and independent-image parallelism. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
|
Follow-up review summary for
Independent validation on Remaining before merge:
The optional managed-runtime direction remains useful within the declared trusted-team, same-node preview scope. The original change request remains open pending the fixes and validation above; no approval or merge has been performed. |
Complete backend isolation through ACL initialization instead of issuing another raw runtime List that can abort the whole service. Retain unknown ACL owners, policies and endpoint leases without activation or orphan GC, including owners whose sandbox metadata is unavailable. Retry inventory, orphan cleanup and pending ACL restore in one bounded runtime poll lane. Keep runsc admission and policy updates closed until recovery succeeds, while healthy backends and explicit cleanup remain available. Do not regenerate other runtimes' policies on a runsc retry. Accept both volatile and fsync=volatile in the maintained real-mount test, retaining readonly, lower-isolation and cleanup assertions. Add recovery, quarantine persistence, session-independent admission and alias tests. Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
|
Follow-up to the review summary: pushed 24d7e6c9. The upstream PR head now correctly points to this commit.
On this exact source, formatting, vet, the full Go suite, race tests for all six affected packages, and runtime-binary build pass. Fresh CI/full runtime matrix is running; the seven base jobs have passed. The final-candidate profile-enabled same-node start/checkpoint/source-deletion/restore smoke remains pending and is not implied by these checks or the earlier ordinary-runtime E2E. The PR description now records these boundaries. No cluster deployment or runtime pins were changed; review threads remain open. |
|
Independent re-review of
Independent local validation on this source passed:
For CI provenance, the build job checked out GitHub's synthetic merge The remaining merge gate is:
No new code blocker was found in this incremental review. The opt-in same-node preview direction remains reasonable within its documented scope; durable restart/cross-node/GC/production tenant isolation are still outside that qualification. Keep the existing Request changes until the remaining smoke evidence is reviewed. No approval or merge performed. |
|
@rcyw I have now completed the missing profile-enabled managed Docker smoke on final PR head Source, build and runtime identity
Explicit profile configuration and isolation An owned namespace/Pod ran its own API, Redis, Coordinator, ADXlet, Sandboxd and managed-image broker. It did not register with or replace the existing production workers/control plane. It used a uniquely marked private directory on the existing node's direct XFS mount; the same device/directory identity and a real The selected The fixed tools image was Executed sequence and assertions (all passed)
Captured versus restored witness: {
"captured": {
"nonce": "b9fed24fb9520adb9dd4fd08f2c46a51",
"pid": 1,
"starttime": "1498",
"heap_sha256": "5d57095b9850dab6ccb2fd632ac780fcb423ccea814406a1d8e6d83e3c5cfc98",
"counter": 41,
"fd_offset": 7,
"private_sha256": "10e19eb1616569d3d861ef35b696ff3c402232b08666b2304189d5ca0706dfb0",
"launches": 1,
"client": {
"pid": 413,
"nonce": "42aa302fd38117ed4b70e9f50813103c",
"starttime": "1650",
"tcp_inode": "socket:[168]"
}
},
"source_after_capture": {
"counter": 99,
"fd_offset": 19,
"private_sha256": "57096724968ee84793d6cc64747a2728de51f9fc516cd998ef41ea5d7412c35e"
},
"restored": {
"nonce": "b9fed24fb9520adb9dd4fd08f2c46a51",
"pid": 1,
"starttime": "1498",
"heap_sha256": "5d57095b9850dab6ccb2fd632ac780fcb423ccea814406a1d8e6d83e3c5cfc98",
"counter": 41,
"fd_offset": 7,
"private_sha256": "10e19eb1616569d3d861ef35b696ff3c402232b08666b2304189d5ca0706dfb0",
"launches": 1,
"client": {
"pid": 413,
"nonce": "42aa302fd38117ed4b70e9f50813103c",
"starttime": "1650",
"tcp_inode": "socket:[168]"
}
}
}Source ID: Cleanup and retained dependencies The restored sandbox was deleted and the snapshot deletion was requested; a subsequent authoritative isolated API query returned zero environments and zero snapshots. The Sandboxd runtime directory contained only its shared The qualification boundary remains opt-in trusted-team, same-node restore. This does not qualify daemon/host restart recovery, cross-node portability, durable snapshot/artifact leases, automatic artifact GC or production multi-tenant isolation. I have left the review threads open for your independent verification and have not approved or merged the PR. Please review this final-head evidence against the remaining merge gate. |
rcyw
left a comment
There was a problem hiding this comment.
The independently enabled managed-profile smoke on 24d7e6c9bf4de622d45b89f0a312cd55b87efddb found R4: the configured private HTTP Registry cannot prepare managed images through the new image-management endpoint. I am keeping Request changes and withholding approval.
R1/R2/R3 remain verified as reported in the previous follow-up, and the candidate's CI remains green. This is an additional failure in the enabled feature path; I am not claiming a newly discovered default-runtime regression.
What actually ran, using an owned local network/data directory and the unchanged candidate binary:
- Built the tool image and the pinned AKernel
49c35a2dimage-bridge/adapter; helper tests passed. Used the companion standalone OCI spec, the configured runsc raw/packet-socket flags, a private management socket, disposable Basic authentication, and an isolated reflink-capable XFS fixture. - Started the outer sandbox with
managedRuntimeProfile=smoke, an authorized tenant, and the default 4096 MiB private upper + 4096 MiB root geometry. Verified the injected EROFS bootstrap, readonly operator configuration and file-backed tmpfs. - Started the real Docker/containerd/snapshotter stack. Native remote Buildx successfully built and pushed a Nydus image under the collection-authorized repository prefix.
- Preparing that image through the broker failed. Bypassing the adapter and calling Sandboxd's private endpoints directly isolated the same failure:
| Request for the same immutable image | Actual result |
|---|---|
POST /registry_metadata with insecure=true |
200; manifest SHA-256 matches the requested digest and contains Nydus layers |
POST /oci_mount with the configured Registry hostname |
500; attempts https://<registry>:5000/v2/, then reports http: server gave HTTP response to HTTPS client |
POST /oci_mount through a node-local localhost:5000 route to the same Registry/image |
200; real ROFS mount and the expected image process are returned |
Thus the image, authentication, node reachability and Nydus/FUSE prerequisites are valid. The direct endpoint reproduction also removes the pinned adapter's older auth-file format from the causal path. The profile has registry_insecure=true and its retained record/profile correctly select HTTP, but that choice cannot reach /oci_mount: its request/forwarding path carries only the image reference, and Nydus detection calls FetchImage(..., false); the ordinary OCI fallback also selects HTTPS for this hostname. Successful insecure metadata access does not configure later mounting.
Minimal reproduction on an explicitly enabled private HTTP profile with any valid digest-pinned Nydus image:
import base64
import hashlib
import http.client
import json
import socket
# Use the configured non-loopback Registry hostname and an existing image.
ref = "registry.internal:5000/managed/COLLECTION/probe@sha256:DIGEST"
class Unix(http.client.HTTPConnection):
def connect(self):
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
self.sock.connect("/run/sandboxd/image-api/image.sock")
def post(path, body):
conn = Unix("localhost", timeout=120)
conn.request("POST", path, json.dumps(body),
{"Content-Type": "application/json"})
response = conn.getresponse()
status, payload = response.status, response.read()
conn.close()
return status, payload
status, payload = post("/registry_metadata", {
"reference": ref, "kind": "manifests", "insecure": True,
})
assert status == 200, (status, payload)
manifest = base64.b64decode(json.loads(payload)["data"])
assert "sha256:" + hashlib.sha256(manifest).hexdigest() == ref.split("@")[1]
assert any("nydus" in json.dumps(layer).lower()
for layer in json.loads(manifest)["layers"])
status, payload = post("/oci_mount", {"image_url": ref})
assert status == 200, (status, payload) # Fails: 500, HTTPS to HTTP Registry.The fixed candidate must pass:
- Carry the trusted operator-selected Registry transport through actual managed preparation, including Nydus detection/mounting and relevant OCI fallback, while preserving ordinary HTTPS defaults.
- Add a regression that uses a non-loopback HTTP Registry hostname and real registry-client/mounter behavior. Mocking
MountOCIalone or only testing/registry_metadatadoes not cover this failure. - Rerun required checks/CI as appropriate and complete the enabled-profile start → checkpoint → source deletion → same-node restore smoke on the final fixed candidate, checking original process/private-upper state and retained image dependencies.
The complete managed C/R smoke is not passed: the configured-hostname image-preparation failure prevents launching its inner workload, so no checkpoint/restore success is being claimed. No product source, runtime pins, existing deployment or default branch was changed, and no merge was performed.
Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
rcyw
left a comment
There was a problem hiding this comment.
Re-review of 40e0c81037aba1fb3287e5df967dfedb5a28b801: the original R4 HTTP-hostname failure is addressed, but the new explicit HTTPS policy has an inconsistent boundary that still needs correction (R5/P2).
Independent checks on this candidate passed:
- Clean-source
make check-fmt vet test e2e-runtime-binaries. - The maintained privileged
make managed-registry-test: real HTTP hostname, private management Unix API, OCI extraction/kernel overlay mount, repeated ownership/release, and Nydus bootstrap/config acquisition. - Full race tests for config, shared Registry client, Nydus, distillfs, management API, server, sandbox, runsc and keyedlock.
The operator-owned exact-authority policy and startup rejection of conflicting transports are a reasonable direction. The remaining issue is that only http entries affect the shared client's selection. An explicit https entry falls through to the registry library's private-IP/loopback HTTP behavior, while the Nydus backend consumes that same entry as https. Thus one declared operator policy does not mean the same transport at each stage.
A real local Registry reproduction on the unmodified candidate produced:
| Configuration / endpoint | Result |
|---|---|
| HTTPS policy + TLS Registry under a hostname | PASS |
| HTTPS policy + TLS Registry under its loopback IP | PASS |
| No policy + plain HTTP loopback Registry | PASS, expected legacy compatibility control |
| Explicit HTTPS policy + plain HTTP loopback Registry | Fetch succeeds; expected rejection fails |
The getter reports https, but FetchImage(..., false) successfully returns the plain-HTTP image. This is distinct from preserving historical behavior for unconfigured registries. The library has the same heuristic class for RFC1918 authorities; the explicit operator selection should override it. Metadata likewise only special-cases HTTP, so please make both choices authoritative across fetch/metadata/backend paths, without changing unconfigured registries.
Minimal regression in package imageregistry:
func TestExplicitHTTPSRejectsPlainHTTP(t *testing.T) {
server := httptest.NewServer(registry.New())
defer server.Close()
host := server.Listener.Addr().String()
tag, err := name.NewTag(host+"/probe:latest", name.Insecure)
if err != nil { t.Fatal(err) }
if err := remote.Write(tag, empty.Image); err != nil { t.Fatal(err) }
legacy, err := NewClientWithRegistrySchemes("", nil)
if err != nil { t.Fatal(err) }
if _, err := legacy.FetchImage(context.Background(), host+"/probe:latest", "", false); err != nil {
t.Fatalf("unconfigured compatibility control: %v", err)
}
client, err := NewClientWithRegistrySchemes("", map[string]string{host: "https"})
if err != nil { t.Fatal(err) }
if scheme, ok := client.RegistryScheme(host+"/probe:latest"); !ok || scheme != "https" {
t.Fatalf("explicit policy = %q, %t", scheme, ok)
}
if _, err := client.FetchImage(context.Background(), host+"/probe:latest", "", false); err == nil {
t.Fatal("explicit HTTPS policy accepted a plain HTTP Registry")
}
}Imports: context, net/http/httptest, testing, and the go-containerregistry pkg/name, pkg/registry, pkg/v1/empty, pkg/v1/remote packages. My full temporary probe also includes the two real TLS controls above; it has been preserved and removed from the review checkout, which is clean.
New-head CI 41850746700 was still running at the latest check (13/15 jobs succeeded; two runtime jobs remained in progress). The new storage integration step passed. I have not seen a new author reply or managed-profile C/R report for 40e0c810; the detailed prior report qualifies 24d7e6c9, not this changed source.
Before approval, please close the explicit HTTPS-policy discrepancy, obtain the fixed candidate's completed CI, and provide its affected managed start/checkpoint/source-deletion/restore evidence. R1/R2/R3 retain their previously verified scope. No product source was committed or pushed, no new standalone deployment was started in this round, and no approval or merge was performed.
Signed-off-by: 月可 <hukeyang.hky@antgroup.com>
|
@rcyw R4 and its HTTPS-policy follow-up R5 are fixed on 8760ca581852940d58241f6255d8c35867da781e. Fresh affected managed-profile acceptance on this exact source passed. Previous Registry transport and the correctionThe earlier literal-IP test used 40e0c810 propagates a node-owned exact-authority policy from configured managed profiles into the shared Registry client, Nydus bootstrap acquisition, the real ROFS backend and OCI fallback; conflicting profile choices fail startup. Your R5 observation was also reproducible: merely omitting Maintained regression and CI
Final-source managed start → checkpoint → delete source → restoreThis was a new owned standalone API/Redis/ADXlet/Sandboxd/broker instance in a dedicated namespace and private direct-XFS directory, limited to 4 CPU / 8 GiB. Production Deployment/DaemonSet/control-plane configuration and runtime artifact pins were not changed.
The Dockerfile ( The source The restored sandbox Snapshot: Cleanup completed: the isolated API listed zero environments and zero snapshots, then the owned namespace/Pod/copied Secrets, private XFS directory, port-forward and local temporary API key/trust files were removed. The cleanup watchdog was stopped. Shared immutable Registry artifacts and normal BuildKit/ROFS/Dragonfly caches were intentionally retained. No production deployment was changed. This qualifies the affected opt-in, same-node managed-profile path on the final source. It does not claim a replay of the full Harbor/Claude cohort, cross-node portability, daemon/host restart recovery, durable artifact GC or production multi-tenant isolation. Reviewer threads remain open for independent verification; no approval or merge was performed. |
rcyw
left a comment
There was a problem hiding this comment.
Re-reviewed and independently qualified final head 8760ca581852940d58241f6255d8c35867da781e (tree f4d534a226900018ed0c5da868d0a19eb2bd77cf). No remaining blocking findings for the documented opt-in, trusted-team, same-node preview.
R1–R3 retain their verified fixes for backend/ACL recovery, concurrent image ownership and older-kernel overlay fallback/assertions. R4's original HTTP-hostname Nydus/FUSE counterexample is fixed; R5's unchanged explicit-HTTPS probe now passes, with real TLS and unconfigured-Registry compatibility controls. The new policy/hint/private-IP matrix and backend override coverage pass.
Independent final-head validation:
- Clean-source
make check-fmt vet test e2e-runtime-binaries, full race tests across nine relevant packages, and the privileged real HTTP Registry / Unix management API / kernel mount integration all pass. - CI 41854265452: 15/15 jobs successful, including all eight runtime E2E cases and the real HTTP Registry mount regression. Its synthetic merge
dd860847has the same source tree as this head. - A separate bounded local fixture ran real Docker/containerd/snapshotter, native remote Buildx → HTTP-hostname Registry → Nydus/ROFS → Compose. The executing sandboxd binary was checked before capture, after source deletion and after restores: SHA-256
b088a5ca0d8d87a54547d1920b6379da3ba9f831b124eb1fdadd0d057d14bca6, built from clean final source. - Checkpointed the running workload, changed the live source's counter/FD/private file, deleted the source sandbox, then restored two targets from the retained checkpoint. Original Docker CID/StartedAt/process identity, random in-memory nonce and 128 KiB RAM marker survived; counter/FD/private upper returned to captured state. Init launch count stayed 1. A write in restored A stayed absent from restored B. A new container using the retained image with
--pull=neveralso succeeded after source deletion. Restore did not replay runtime startup, build, pull or Compose up. - Both restored targets were normally deleted before checkpoint removal; owned containers/network/cgroups/XFS mount/loop were released. The primary product checkout was untouched.
My local test uses direct sandboxd APIs plus pinned AKernel 49c35a2d helper/adapter inputs; it is complementary to the author's final-head SDK/Compose report, which also covers established TCP continuity. It is not a claim that I independently replayed that latest SDK stack.
Fixture failures were retained: an initial readiness race, and a first C/R attempt whose daemons descended from raw runsc exec and were intentionally killed by gVisor restore (Killing exec'd process). Rebuilding the fixture with the Docker stack descending from normal sandbox init resolved that lifecycle issue; the successful restores required no startup replay or product changes.
Non-blocking follow-up: automate a compact managed-profile C/R CI fixture using normal init and bounded readiness, asserting source deletion, retained-image use and independent restored uppers. The ordinary runtime matrix does not itself enable this profile.
Durable snapshot/collection leases, daemon/host restart recovery, cross-node portability, automatic GC and production multi-tenant isolation remain outside this qualification. Approving this head within the documented preview contract. No merge performed.
Add an explicitly enabled
managedRuntimeProfilefor native remote Buildx/Compose. Sandboxd authorizes the tenant/profile and supplies the fixed tools, bootstrap and private image-management socket; Registry credentials, endpoints and host paths remain platform-owned. Managed images share the ordinary OCI/ROFS reference counter, while each sandbox's private Docker upper uses checkpoint-managed file-backed storage.Restore checks current tenant authorization and a profile fingerprint. Expanding or reordering the tenant allowlist does not invalidate compatible snapshots. Whole-sandbox checkpoint/restore remains independent of application Python and process signals. Default/0 restore admission remains unlimited; only an explicit positive value enables limiting. The base includes writable
/etc/hosts(#96) and layered OCI mount overrides (#97); runtime artifact pins are unchanged.Review corrections in
a2ce494dand24d7e6c9:EINVAL; other errors remain failures. Real-mount assertions accept exactvolatileandfsync=volatiletokens while preserving readonly, lower isolation and cleanup checks.Registry transport corrections in
40e0c810and8760ca58:Validation on final head
8760ca581852940d58241f6255d8c35867da781e(treef4d534a226900018ed0c5da868d0a19eb2bd77cf):--pull=never. The hostname's actual ROFS backend was HTTP despite an HTTPS default template.Scope: opt-in trusted-team preview, same-node restore. Durable collection/snapshot leases, daemon/host restart recovery, cross-node portability, automatic artifact GC and production multi-tenant isolation remain unqualified. Earlier Draft #81/#83 overlap this integrated change and require reconciliation before independent merging. Reviewer threads remain open for independent verification; no approval or merge is performed here.