Commit Graph
8 Commits
Author SHA1 Message Date
Pat Christopher 116232b2a1 fix: prevent bootstrap cluster pods getting IPs from kind CIDR (#1835)
* fix: prevent bootstrap cluster pods getting IPs from kind CIDR

Signed-off-by: Patrick Christopher <pchristopher@nvidia.com>

* fix: resolve coderabbit comments

Signed-off-by: Patrick Christopher <pchristopher@nvidia.com>

* fix: nerdctl bridge check

Signed-off-by: Patrick Christopher <pchristopher@nvidia.com>

* fix: prevent nerdctl networking from getting into the site node networking

Signed-off-by: Patrick Christopher <pchristopher@nvidia.com>

* fix: local agent review

Signed-off-by: Patrick Christopher <pchristopher@nvidia.com>

* fix: prevent env var being set to cause networking being forced into nerdctl that gets shared to cluster

Signed-off-by: Patrick Christopher <pchristopher@nvidia.com>

---------

Signed-off-by: Patrick Christopher <pchristopher@nvidia.com>
2026-10-22 10:38:50 -04:00
Davanum SrinivasandClaude Fable 5.1 668bc38a9b feat(cli)!: rename nkectl to nvkectl, keeping the old names for one release (#1456)
The binary, its directory, its config directory and its environment
variables take the new name. For one release the previous names still
work: every NVKECTL_* setting is also read under its NKECTL_* name with a
deprecation warning (the NKECTL_CWE_* names of the generation before are
no longer read), a config file left under nkectl/ is read and copied to
nvkectl/ once, and releases publish both nvkectl-<os>-<arch> and
nkectl-<os>-<arch>, to GitHub and to S3 under the existing prefix.

The e2e helper package, the e2e test, the smoke and fetch scripts and
the bootstrap e2e workflow follow the binary; the fetch script accepts a
release that carries only the old asset name. The CLI's own documents
and the two installation documents that print the download URLs change
with it.

Kept on purpose: the NVCR repository name until an nvkectl repository
exists in the NGC org, the S3 prefix the publishing role's policy names,
and the prose in the other documents.

BREAKING CHANGE: the CLI is installed and invoked as nvkectl. The
previous binary name, environment variable names and config directory
are honoured for one release, as described above.

Closes #1455

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 17:04:03 -04:00
Aaron Patten 9b87e9b636 chore(nkectl): say controller, not CWE, in output, comments and tests (#1386)
Signed-off-by: Aaron Patten <apatten@nvidia.com>
2026-10-09 11:07:29 -04:00
rorajani 6ded04c8ea ci(bootstrap-e2e): start containerd and buildkitd without systemd (#1102)
* ci(bootstrap-e2e): start containerd and buildkitd without systemd

install_runtime writes two systemd units and starts them with systemctl.
A runner pod has no init system, so on ARC the lane dies at

  System has not been booted with systemd as init system (PID 1).
  Can't operate.

The units are still written either way -- they document the exact flags,
and a VM runner uses them. Only the starting differs, and both
wait_for_socket assertions are unchanged, so the success condition is
the same. Failure diagnostics read the daemon log instead of journalctl.

remove_docker is the part that needs a decision, not just review. It
proves Docker is gone by asserting its units are masked. In a pod there
are no units: Docker is a dind sidecar reached over a mounted socket, so
removing the socket makes it unreachable while the daemon still exists.
That is a weaker guarantee than masking, and the two masking assertions
are skipped without systemd to match. The shim assertions, which are the
substantive ones, still run on both paths.

Verified on arc-arm64-vtpm: the lane cleared Install nerdctl, Remove
Docker and Build CWE image, and now fails three steps later at
kubeadm init, where the nested control plane never becomes healthy.
That blocker is unrelated to this change and is why the lane stays on
the self-hosted fleet in #1042.

* ci(bootstrap-e2e): make the no-systemd Docker removal as strong as masking

The first version deleted the dind socket and skipped the masking
assertions, calling the guarantee weaker and leaving the question open.
It was weaker for a concrete reason: the kubelet can restart the dind
sidecar, and it recreates the socket on startup, so a job could reach a
daemon again halfway through.

Close it instead of documenting it. Without systemd the client itself is
removed, and DOCKER_HOST is pointed at a path that does not exist via
GITHUB_ENV so later steps inherit it -- nothing left to reach a restarted
sidecar with. Deleting the binary is safe exactly here and nowhere else:
this runner is an ephemeral pod thrown away after one job, where on a
reusable VM it would outlive the run and break the next one.

Both halves are now asserted rather than assumed, for the reason the
masking always was: a removal that did not take reads as a guarantee
while providing nothing.

* ci(bootstrap-e2e): create /etc/systemd/system before writing the units

The unit files are written on every host, including the ones with no
systemd to read them, where that directory is incidental rather than
guaranteed. It exists on both fleets today -- the ARC run installs the
runtime fine -- so this is not a live failure. But a suite whose purpose
is working without systemd should not rest on a directory systemd owns.

Raised by CodeRabbit on #1102.

* ci(bootstrap-e2e): gate the Docker deletion on a disposable host, not on systemd

Two review points on the no-systemd path.

have_systemd detects an init system, not a host that gets discarded, and
the binary deletion was keyed off it. On a reusable non-systemd host that
deletes every docker on PATH permanently, outliving the run and taking
the next one with it -- and the shim does not put them back. It now waits
on NKE_E2E_DISPOSABLE_HOST, which only a caller that knows its runners
are single-use can set; this workflow does, and anything that has not
said so keeps its binaries and gets the shim and DOCKER_HOST alone. That
is weaker only against a caller invoking a real binary by absolute path
with its own -H, and the assertion that the binaries are gone now runs
only where the deletion was the path taken.

The unmanaged daemons' logs move out of /tmp/<name>.log into a
root-owned 0700 directory. They are written by a root redirect, so on a
host where another local user can pre-create that path as a symlink the
redirect follows it.

* ci(bootstrap-e2e): pass start_unmanaged's argv as positional parameters

It joined argv with "$*" into a `sudo sh -c` string, so the root shell
re-split the result on whitespace and acted on metacharacters, and the
caller's quoting did not survive. The daemon flags come from the
environment, CONTAINERD_ADDRESS and BUILDKIT_HOST among them.

Demonstrated with three arguments -- "two words", "semi;colon", "a*b" --
which the old form turned into [two] [words] [semi] and then ran `colon`
as a command. The new form keeps all three intact.

CI sets fixed values, so this was the general case rather than a live
hole. Predates this branch; it is in scope because the redirect on this
line moved here.
2026-10-05 09:26:21 -04:00
rorajani 6947a934ab fix(bootstrap-e2e): keep nerdctl's data root off overlayfs (#1136)
This is why nkectl-bootstrap-e2e fails on a container runner and passes
on a VM. The kind node image declares VOLUME /var/lib/containerd, so the
node's own containerd keeps its snapshots in an anonymous volume, and
anonymous volumes live under nerdctl's data root. That default is
/var/lib/nerdctl -- real disk on a VM, the pod's overlayfs root in a
container.

Overlay cannot be mounted with its upperdir on overlayfs, so every
control-plane sandbox failed to start:

  failed to start sandbox: failed to create containerd task: failed to
  create shim task: failed to mount rootfs component: mount source:
  "overlay", ... upperdir=/var/lib/containerd/io.containerd.snapshotter
  .v1.overlayfs/snapshots/3/fs, ... err: invalid argument

The kubelet wrote all four static pod manifests and then created
nothing, which is why the only visible symptom was kubeadm retrying
against 10.4.1.2:6443 and getting connection refused. crictl ps -a and
crictl pods were both empty.

Point the data root under containerd's own root instead. That path
already has to be non-overlay for the CWE image build, so this inherits
an existing requirement rather than adding a new one, and it is asserted
at install time -- on overlayfs the lane fails here with the reason
instead of twelve minutes later with none.
2026-10-01 18:04:37 +05:30
Davanum Srinivas e7cd1d7a48 fix(cli): retry the nerdctl download in the e2e host bootstrap (#981)
A 500 from the GitHub releases CDN failed nkectl bootstrap e2e on arm64 in
67 seconds. Same flags the workflow already uses for its own downloads.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-09-22 21:24:32 -04:00
Davanum Srinivas 4ce6c34a4d ci: add arm64 legs to the remaining e2e lanes and name artifacts by arch (#875)
* ci: add arm64 lanes to the four amd64-only e2e workflows

Four e2e workflows ran one architecture. capd-e2e and nico-e2e already
run both, and kubeadm-bringup-e2e and nico-vms-e2e run both on the
self-hosted KVM fleet.

  gofail-e2e                      ubuntu-latest      + ubuntu-24.04-arm
  capd-dsx-identity-exchange-e2e  linux-amd64-cpu16  + linux-arm64-cpu16
  nkectl-bootstrap-e2e            linux-amd64-cpu16  + linux-arm64-cpu16
  local-entrypoint-e2e            linux-amd64-cpu16  + linux-arm64-cpu16

None of the four needs /dev/kvm, so none goes on the self-hosted fleet.
gofail is hosted on both sides because it reads its CAPNICo CRDs from a
committed fixture and needs no token, so a fork can run it. The other
three set NKE_E2E_DOCKERHUB_MIRROR, which only resolves inside the NVIDIA
fleet, so both their legs stay there.

Three downloads hard-coded the architecture and now read it:

  nkectl-bootstrap  clusterctl-linux-amd64 -> dpkg --print-architecture
  nkectl-bootstrap  nerdctl --platform linux/amd64 -> matrix.arch
  local-entrypoint  tilt linux.x86_64 -> the case nico-vms-e2e.yml uses

local-entrypoint crosses architecture with its existing post-init CNI
matrix, so it goes from two jobs to four.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

* ci: fix the arm64 legs found by verification

- bootstrap-e2e-host.sh downloaded nerdctl-full for linux-amd64 on any
  host, and one pinned checksum passed it, so arm64 died at the first
  exec. Now per-arch, both sums from the release SHA256SUMS.
- gofail keyed its caches on runner.os, Linux on both legs. Added
  runner.arch.
- Artifact names carried no arch in kubeadm-bringup, nkectl-bootstrap
  and local-entrypoint. Run 35451757091 produced two artifacts both
  named kubeadm-bringup-35451757091-1.
- Two comments said what the code refutes: gofail does not run on a
  fork, and the mirror is not what holds nkectl-bootstrap on the fleet.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

* ci: gate the CRD drift check to amd64, drop a one-sample claim

- The CAPNICo fixture is arch-independent, so the arm64 leg only doubled
  the gh api calls and the flake surface.
- Two runs disagree on which gofail leg is slower (arm64 10m14s/9m41s,
  amd64 7m09s/11m45s), so the header no longer names one.
- cwedeploy.go:426-429 named by function instead of line.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

* ci: run local-entrypoint arm64 on the default CNI path only

Three legs, not four. The post-init CNI path is this lane's unique
coverage and stays on amd64; arm64 covers the default path. The pool
constraint here is queue time, not the 11 minutes a leg takes.

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>

---------

Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>
2026-09-20 13:42:51 -04:00
Lia 965e7b9125 ci(nkectl): move the e2e job's host preparation out of the workflow (#670)
Two steps -- installing the standalone containerd and buildkitd, and removing
Docker -- were over two hundred lines of bash inside YAML, where shellcheck
saw them only through actionlint and nothing could exercise them off a
runner. They are now cli/hack/bootstrap-e2e-host.sh with one subcommand each,
next to the cli e2e suite they serve.

The bodies moved verbatim, less their duplication: the two socket polling
loops are one helper. The shim directory lives in RUNNER_TEMP on a runner and
TMPDIR otherwise, and the GITHUB_PATH prepend is skipped with a message when
there is no runner, so the script also serves a developer reproducing CI.

Comments went with the code they explain and were cut back on the way: the
workflow's prose is roughly halved, and what is left says what the job does
rather than recounting the incidents behind each setting. The workflow keeps
what is about the job -- the pinned environment, and that the runners are
single-use so nothing needs undoing.

hack/shell-scripts.sh enumerates tracked scripts by extension, so the merge
gate lints the new file at the same severity as every other.

Co-developed-by: Claude <noreply@anthropic.com>

Signed-off-by: Lia Campbell <liac@nvidia.com>
2026-09-14 17:46:17 -07:00