Repository navigation
fix: ask cloud-init whether a machine booted as root - #65
Merged
riadelhajjaji-scality merged 1 commit intoNov 2, 2026
Merged
Conversation
riadelhajjaji-scality
requested review from
TeddyAndrieux,
eg-ayoub and
g-carre
and removed request for
g-carre
October 29, 2026 08:28
Contributor
Author
|
Replaced by #66 |
Contributor
Author
|
@TeddyAndrieux I reopened this PR because it is now being used alongside #5818 (https://github.com/scality/artesca/pull/5818) to test the CI bug that this PR was meant to fix |
eg-ayoub
reviewed
Nov 2, 2026
Updating a platform waits again on every machine, the ones left alone included. On a Rocky machine where anything installed a package since it booted, `cloud-init status` failed as the SSH user with a PermissionError on /run/cloud-init/cloud.cfg, so the update failed with "booted badly, cloud-init exited 1". The cloud-init package keeps /run/cloud-init to root through a tmpfiles rule, and the systemd package runs every tmpfiles rule again whenever a package ships one. cloud-init then cannot read its own runtime config for anybody else (canonical/cloud-init#6680). Freshly booted machines did not show it, which is why spawns, and updates of platforms nothing was installed on, went through. The status is now asked through `sudo -n`, which the SSH users of the images have, and which fails rather than waits on a password.
riadelhajjaji-scality
force-pushed
the
bugfix/wait-for-boot-cloud-init-as-root
branch
from
November 2, 2026 12:31
4ac5657 to
43eda45
Compare
eg-ayoub
approved these changes
Nov 2, 2026
riadelhajjaji-scality
deleted the
bugfix/wait-for-boot-cloud-init-as-root
branch
November 2, 2026 14:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating a platform waits again on every machine, the ones left alone included. On a Rocky machine where anything installed a package since it booted,
cloud-init statusfailed as the SSH user with aPermissionErroron/run/cloud-init/cloud.cfg, so the update failed with "booted badly, cloud-init exited 1". This breaks the MetalK8sbootstrap-restorenightly at "Destroy the Bootstrap node" every night since it moved to platform-spawner (e.g. https://github.com/scality/metalk8s/actions/runs/40701329682).The cloud-init package keeps
/run/cloud-initto root through a tmpfiles rule (d /run/cloud-init 0700 root root), and the systemd package runs every tmpfiles rule again whenever a package ships one (%transfiletriggerin -- /usr/lib/tmpfiles.d→systemd-tmpfiles --create). cloud-init then cannot read its own runtime config for anybody else (canonical/cloud-init#6680). Freshly booted machines do not show it, which is why spawns, and the update test here where nothing gets installed, went through. In the failing run the bastion passed the same check a second before node-2 failed it.The status is now asked through
sudo -n, which the SSH users of the images have, and which fails rather than waits on a password.