Skip to content

fix(prepare-node-script): Check for existing or leftover config in /etc/cni #887

Open
mv-2112 wants to merge 3 commits into
canonical:mainfrom
mv-2112:prepare-node-check
Open

fix(prepare-node-script): Check for existing or leftover config in /etc/cni #887
mv-2112 wants to merge 3 commits into
canonical:mainfrom
mv-2112:prepare-node-check

Conversation

@mv-2112

@mv-2112 mv-2112 commented Jul 16, 2026

Copy link
Copy Markdown

If these files existing from a prior install of Sunbeam they will prevent k8s starting
up correctly leaving it in a state of Feature 'load-balancer' is not ready.

This change adds a simple check to the prepare-node-script output that will issue
an error.

Refs: #2152691

QA steps

While https://canonical-openstack.readthedocs-hosted.com/en/latest/tutorial/get-started-with-openstack/ suggests best practice is to use a fresh install, many do not.

To test these change, install as per the tutorial, enable the new amphora based Octavia as per https://canonical-openstack.readthedocs-hosted.com/en/latest/how-to/features/load-balancer/.

Tear down the sunbeam installation, clearing up the usual detritus of sunbeam snap installs under /var/lib/juju ~/.local/share/juju ~/.local/share/openstack ~/snap/openstack ~/snap/openstack-hypervisor ~/snap/microstack ~/snap/juju ~/snap/k8s /run/containerd, and note the files do exist in /etc/cni now. Leave these in place for now.

Reinstall Sunbeam. You will hit a timeout, and on investigation you'll find juju status -m admin/openstack-machines shows k8s stuck in a state of Feature 'load-balancer' is not ready. With this change in place you will be warned before starting the bootstrap process and avoid this situation.

Tear down the sunbeam installation once more, and this time remove the files under /etc/cni (e.g rm -rf /etc/cni/*)

Reinstall Sunbeam, it should work as expected.

Links

lp#2152691

@mv-2112
mv-2112 marked this pull request as draft July 16, 2026 12:28
@mv-2112
mv-2112 marked this pull request as ready for review July 16, 2026 12:53
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