Skip to content

urunc-cleanup: unnecessary k3s volume mount and redundant label removal in reset path #993

Description

@saitejagirada

Description

The urunc-cleanup DaemonSet's k3s overlay mounts the host's containerd config directory (/var/lib/rancher/k3s/agent/etc/containerd/) into the cleanup pod. However, the reset code path in install.sh — which is the only action the cleanup pod runs — never accesses any files under /etc/containerd/. It only uses kubectl API calls and nsenter syscalls to restart the CRI runtime.

The volume mount was copied from the urunc-deploy k3s overlay, where it is needed for the install and cleanup code paths that modify containerd configuration via tomlq.

Additionally, the reset case block at line 395 in install.sh calls kubectl label node "$NODE_NAME" urunc.io/urunc-runtime- and then calls reset_runtime(), which internally runs the exact same kubectl label command again at line 308. This second call is redundant and produces a warning.

System info

  • Urunc version: main branch (HEAD)
  • Arch: N/A (deployment manifests / shell script)
  • VMM: N/A
  • Unikernel: N/A

Steps to reproduce

  1. Trace the reset code path in deployment/urunc-deploy/scripts/install.sh: main("reset") → reset_runtime() → restart_cri_runtime() → wait_till_node_is_ready(). No filesystem I/O on /etc/containerd/.
  2. Compare urunc-cleanup/overlays/k3s/mount_k3s_conf.yaml with urunc-deploy/overlays/k3s/mount_k3s_conf.yaml — the cleanup version adds a volume mount that the reset path never uses.
  3. Run kubectl kustomize deployment/urunc-deploy/urunc-cleanup/overlays/k3s/ with and without the patch — output is functionally identical for the reset use case.
  4. For the redundant label: line 395 and line 308 both run kubectl label node "$NODE_NAME" urunc.io/urunc-runtime-.

LLM usage

An LLM (Google Antigravity / Claude Opus 4.6) was used to assist with code path analysis and tracing. All findings were independently verified by reading the source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions