fix(os-templates): correct qemu-guest-agent runcmd#27
Merged
Conversation
cloud-init's final stage was failing with exit 5 on every provisioned VM: the runcmd ran 'systemctl start qemu-guest-agent' with no preceding daemon-reload, so systemd hadn't scanned the unit file apt just dropped; and 'systemctl enable' errored on this static (no [Install]) unit, bailing before its implicit reload. With no 'set -e', the last command's exit propagated and marked scripts-user FAILED -> cloud-init status: error. Fix: apt-get update + noninteractive install, daemon-reload, then start (tolerate failure since udev may race activation). Drop the meaningless enable on a static unit. debian-12/13 + ubuntu-2204/2404 (apt), rocky-10 (dnf). Co-Authored-By: Claude <noreply@anthropic.com>
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.
cloud-init final stage failed exit 5 on every provisioned VM: the qemu-guest-agent runcmd ran 'systemctl start' with no preceding daemon-reload (systemd hadn't scanned the unit apt just dropped), and 'systemctl enable' errored on this static (no [Install]) unit first. Last command's exit propagated -> scripts-user FAILED -> cloud-init status: error.
Fix: apt-get update + noninteractive install, daemon-reload, then start ... || true; drop the meaningless enable. debian-12/13 + ubuntu-2204/2404 (apt), rocky-10 (dnf). Rebases cleanly on main (#24 touched reimage code, not os-templates). Already deployed to prod.
🤖 Generated with Claude Code