NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.55k stars 13.71k forks source link

RKE2 crashes on startup because of incorrect image #342593

Open crumohr opened 1 week ago

crumohr commented 1 week ago

Describe the bug

RKE2 crashes because of missing image

Steps To Reproduce

  1. run rke2 server

Screenshots

INFO[0009] Checking local image archives in /var/lib/rancher/rke2/agent/images for index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty
WARN[0009] Failed to load runtime image index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty from tarball: no local image available for index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty: not found in any file in /var/lib/rancher/rke2/agent/images: image not found
INFO[0009] Checking local image archives in /var/lib/rancher/rke2/agent/images for index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty
WARN[0009] Failed to load runtime image index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty from tarball: no local image available for index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty: not found in any file in /var/lib/rancher/rke2/agent/images: image not found
INFO[0009] Pulling runtime image index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty
WARN[0011] Failed to get image from endpoint: GET https://index.docker.io/v2/rancher/rke2-runtime/manifests/v1.30.4-dev.877838a0-dirty: MANIFEST_UNKNOWN: manifest unknown; unknown tag=v1.30.4-dev.877838a0-dirty
FATA[0011] failed to get runtime image index.docker.io/rancher/rke2-runtime:v1.30.4-dev.877838a0-dirty: all endpoints failed: GET https://index.docker.io/v2/rancher/rke2-runtime/manifests/v1.30.4-dev.877838a0-dirty: MANIFEST_UNKNOWN: manifest unknown; unknown tag=v1.30.4-dev.877838a0-dirty

Additional context

Commit 9628367 set incorrect values

Notify maintainers

@mogeko

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[nix-shell:~]# nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 6.10.7-orbstack-00280-gd3b7ec68d3d4, NixOS, 24.05 (Uakari), 24.05.4974.8f7492cce289`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05.4974.8f7492cce289"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
mogeko commented 1 week ago

This bug occurred because the upstream RKE2 modified scripts/version.sh, and I will modify update-script.sh to fix this bug.

https://github.com/rancher/rke2/pull/6062/files#diff-d9002f82f23cc9b3c1545ec7d5ddfc3911aec8ba24d4e3d21c73f40355da2a16