sysbox 0.7.0 fails to install/upgrade on RKE2 1.32,1.33 because "cp: cannot stat '/mnt/host/etc/containerd/config.toml'" error during k8s sysbox installation
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 3.9k
- Forks
- 230
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 3
Description
Using sysbox 0.7.0 on Rancher RKE
rke2 version v1.33.9+rke2r1 (91477e5799063a35553b4d855e7a21bdd53c7009)
go version go1.24.13 X:boringcrypto
produces the following error on sysbox installation:
Detected Kubernetes version v1.33
Detected containerd version 2.1.5-k3s1.
Will use containerd as the container runtime for Sysbox (containerd version supports user-namespaces).
Sysbox env settings have changed.
Adding K8s taint "sysbox-runtime=not-running:NoSchedule" to node ...
node/node-12 modified
Adding K8s label "sysbox-runtime=installing" to node ...
node/node-12 labeled
Installing Sysbox dependencies on host ...
Skipping shiftfs installation (kernel version 6.8 is above the max required for shiftfs (6.2)).
Deploying Sysbox installer helper on the host ...
Running Sysbox installer helper on the host (may take several seconds) ...
Stopping the Sysbox installer helper on the host ...
Removing Sysbox installer helper from the host ...
Failed to get unit file state for sysbox.service: No such file or directory
Installing Sysbox on host ...
Configuring host sysctls ...
kernel.unprivileged_userns_clone = 1
fs.inotify.max_queued_events = 1048576
fs.inotify.max_user_watches = 1048576
fs.inotify.max_user_instances = 1048576
kernel.keys.maxkeys = 20000
kernel.keys.maxbytes = 1400000
kernel.pid_max = 4194304
vm.max_map_count = 262144
Created symlink from /etc/systemd/system/multi-user.target.wants/sysbox.service to /usr/lib/systemd/system/sysbox.service.
Created symlink from /etc/systemd/system/sysbox.service.wants/sysbox-mgr.service to /usr/lib/systemd/system/sysbox-mgr.service.
Created symlink from /etc/systemd/system/sysbox.service.wants/sysbox-fs.service to /usr/lib/systemd/system/sysbox-fs.service.
Starting Sysbox ...
Detected containerd version 2.1.5-k3s1.
Adding Sysbox to containerd config ...
cp: cannot stat '/mnt/host/etc/containerd/config.toml': No such file or directory
On RKE2 the config.toml file is located at /var/lib/rancher/rke2/agent/etc/containerd/config.toml
Thus on sysbox-pkgr/[k8s] (https://github.com/nestybox/sysbox-pkgr/tree/b8403a90017795f42f02d5b2e1b6752d02ce4b57/k8s)/[scripts](https://github.com/nestybox/sysbox-pkgr/tree/b8403a90017795f42f02d5b2e1b6752d02ce4b57/k8s/scripts)
/sysbox-deploy-k8s.sh
the lines
host_containerd_conf_file="${host_etc}/containerd/config.toml"
host_containerd_conf_file_backup="${host_containerd_conf_file}.orig"
host_run="/mnt/host/run"
host_var_lib="/mnt/host/var/lib"
host_var_lib_sysbox_deploy_k8s="${host_var_lib}/sysbox-deploy-k8s"
need to be replaced by
host_run="/mnt/host/run"
host_var_lib="/mnt/host/var/lib"
host_var_lib_sysbox_deploy_k8s="${host_var_lib}/sysbox-deploy-k8s"
host_containerd_conf_file="${host_var_lib}/rancher/rke2/agent/etc/containerd/config.toml"
host_containerd_conf_file_backup="${host_containerd_conf_file}.orig"
for sysbox k8s deployment on a RKE2 cluster.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in k8s/scripts/sysbox-deploy-k8s.sh and inspect how the host containerd configuration path is assembled. Reproduce the Kubernetes deployment on RKE2, update the path handling for the reported configuration location, and verify that Sysbox installation completes without the missing-file error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100