Skip to content

v0.6.0

Choose a tag to compare

@0kenx 0kenx released this 19 Nov 20:22
2ab89d2

Added

  • --start-fd FD (launch config start_fd): an opt-in start gate for
    run. After setup completes, Nucleus emits container_started and the
    container's init blocks reading one byte from the inherited descriptor,
    like the OCI exec FIFO; the workload execs only when the byte arrives, so
    an orchestrator can verify the reported posture first. On EOF without a
    byte the container is torn down and Nucleus exits non-zero without running
    the workload. A SIGTERM to the supervisor while the workload is held
    cancels the hold and tears down the same way (exit status 143), so a held
    container is never unkillable (#42).
  • --broker-proxy-listen 127.0.0.1:PORT (launch config broker_proxy_listen)
    runs the broker forwarder in the supervisor. The container init binds the
    listener in its network namespace and hands it over with SCM_RIGHTS; the
    supervisor relays each connection to the verified broker socket inode. The
    socket is no longer mounted, the workload needs no forwarder binary, proxy
    variables are injected unless --no-broker-proxy-env, and
    container_started reports the address (#39).
  • --memory-high SIZE (launch config memory_high) sets an explicit memory
    throttling watermark; it must not exceed --memory.
  • container_summary resource stats include memory_events (high, max,
    oom, oom_kill) so callers can tell a memory failure from other exits.

Fixed

  • SIGTERM to a foreground nucleus run supervisor killed the supervisor
    outright instead of being forwarded: glibc's sigwait unblocks the waited
    signal set in the calling thread, so the forwarding thread became the one
    thread where the signal's default disposition ran. The forwarded-signal
    set is now blocked before the first helper thread is spawned (every
    thread inherits the mask) and consumed with sigtimedwait, which never
    touches the mask. SIGTERM now reaches the container's init, which can
    shut the workload down gracefully; a workload that is PID 1 of its PID
    namespace and installs no handler still ignores it (as with any OCI
    runtime) — use SIGKILL for a guaranteed teardown.
  • --memory no longer sets memory.high to 90% of the limit. With swap
    disabled that throttled a runaway workload just below the limit almost
    indefinitely; it is now OOM-killed at memory.max (#37).
  • After a supervisor SIGKILL the reaper also removes the gVisor state and
    bundle directory under nucleus-gvisor/<id> (#38).
  • Delegated cgroups of the systemd user manager are detected. The user manager
    sets no delegate xattr, so for a service or scope under
    user@<uid>.service Nucleus reads the unit's Delegate property with
    systemctl --user show. Strict modes now get resource enforcement under
    systemd-run --user [--scope] -p Delegate=yes without NUCLEUS_CGROUP_ROOT.
    The strict-mode cgroup error names Delegate= and NUCLEUS_CGROUP_ROOT, and
    the README documents NUCLEUS_CGROUP_ROOT for layouts that are not detected
    (#34).
  • A native workload whose command cannot be executed (for example a missing
    binary) fails with Failed to execute <command>: <errno> and exit status 1.
    Before, the setup process unwound into a tmpfs unmount after seccomp was
    installed and was killed with SIGSYS (exit 159) without an error message.

Changed

  • Breaking: --broker-socket is refused under gVisor, which could only reach the
    socket with --host-uds=open and so let the sandbox connect to every host
    socket in its mounts. Untrusted workloads with a broker need
    --trust-level trusted --runtime native (#36).
  • The native seccomp filter refuses namespace creation (unshare or clone
    with CLONE_NEW* flags, and setns) with EPERM instead of killing the
    workload with SIGSYS, so nested sandboxes such as bubblewrap report an
    error. The README documents that nested sandboxes do not work under either
    runtime (#35).