Skip to content

fix: declare container identity for systemd nodes - #59

Merged
tianyuzhou95 merged 2 commits into
inclusionAI:mainfrom
tianyuzhou95:codex/fix-systemd-container-detection
Sep 10, 2026
Merged

fix: declare container identity for systemd nodes#59
tianyuzhou95 merged 2 commits into
inclusionAI:mainfrom
tianyuzhou95:codex/fix-systemd-container-detection

Conversation

@tianyuzhou95

@tianyuzhou95 tianyuzhou95 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Deleting a privileged AKernel node Pod can leave its host-backed data filesystem read-only when PID 1 systemd fails to detect that it is running in a container. Systemd's shutdown remount changes the filesystem superblock, so a replacement Pod inherits the read-only state and cannot start sandboxd successfully.

Declare lowercase container=oci in the final all-in-one image and explicitly pass it in the Helm node environment and standalone launcher. The launcher settings also protect deployments using older images. Both Terraform providers consume the same Helm node template. Add checks for the built image environment and PID 1 container detection to standalone CI, and briefly document the deployment implications.

This follows the systemd container interface and its v255 shutdown guard. Existing shutdown signals and service cleanup remain intact; the fix does not automatically remount filesystems or delete sandbox state.

Validation completed locally:

  • make deploy-script-check, entrypoint Bash syntax, CI YAML and embedded shell syntax, and git diff --check passed.
  • Helm lint passed for the umbrella and core charts.
  • Eight render cases passed: umbrella/core defaults with Kruise off/on, plus both Alibaba Cloud and Huawei Cloud values evaluated by Terraform templatefile with synthetic inputs and optional features off/on. Each rendered node environment contains exactly one container=oci and retains existing variables.

Full image build and live PID 1 checks were not run locally; they are included in the existing standalone E2E workflow. Target containerd/ACK validation of normal deletion, rolling replacement, and recreation with dual XFS filesystems and checkpoint bind mounts remains a deployment acceptance check. The deployment guide notes that replacement is required and already read-only filesystems are not automatically repaired.

Set container=oci in the final all-in-one image and explicitly pass it
through Helm and standalone launchers so existing images also identify
their PID 1 systemd as running inside a container. Without this identity,
privileged shutdown can remount shared host filesystems read-only and
leave replacement nodes unable to write logs or state.

Check image metadata and PID 1 container detection in standalone CI, and
document upgrade verification and the recovery order for mounts already
affected by this issue.

Signed-off-by: Tianyu Zhou <albert.zty@antgroup.com>
Keep the deployment guide focused on the container identity requirement,
replacement requirement, and existing read-only filesystem limitation.
Remove the detailed incident recovery and acceptance procedure, and
update the agent guidance link description to match the shorter section.

Signed-off-by: Tianyu Zhou <albert.zty@antgroup.com>
@tianyuzhou95
tianyuzhou95 merged commit 45b03bd into inclusionAI:main Sep 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant