cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

feat: add autopkgtests assert no warnings from cloud-init status

Open blackboxsw opened this issue 3 weeks ago • 1 comments

BLOCKED: awaiting autopkgtest 5.53 in Ubuntu Resolute before we can merge. and #6598 merging in cloud-init.

Introduce autopkgtests for cloud-init to validate runtime of cloud-init status.

Proposed Commit Message

feat: add autopkgtests assert no warnings from cloud-init status

Additional Context

Note this branch will currently "fail" with warnings for two known reasons:

  1. Awaiting fix in debian/cloud-init-base.postinst and .config fixes[1] to avoid cloud-init-base.postinst creating invalid YAML in /etc/cloud/cloud.cfg.d/90_dpkg_local_cloud_config.cfg
  2. Awaiting upstream fix[2] for autopkgtest to stop creating deprecated apt_preserve_sources_list keys in autopkgtest systems during /usr/share/autopkgtest/setup-commands/setup-testbed script.

The second issue can be avoided by changing the string in setup-testbed before running autopkgtest-build-lxd ...

'apt_preserve_sources_list: true'

TO

'apt: { preserve_sources_list: true }'

[1] cloud-init postinst/config fix: https://github.com/canonical/cloud-init/pull/6598 [2] autopkgtest upstream fix https://salsa.debian.org/ci-team/autopkgtest/-/merge_requests/621

Test Steps

# Make sure your test environment has autopkgtest and lxd installed
gh co 6601

# maybe manipulate your host system's /usr/share/autopkgtest/setup-commands/setup-testbed avoiding apt_preserve_sources_list key

autopkgtest-build-lxd ubuntu-daily:questing
autopkgtest --shell --apt-upgrade /home/csmith/src/cloud-init -- lxd autopkgtest/ubuntu/questing/amd64

Merge type

  • [ ] Squash merge using "Proposed Commit Message"
  • [x] Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

blackboxsw avatar Dec 05 '25 01:12 blackboxsw

cc @dbungert for visibility in case of autopkgtest input/suggestions.

blackboxsw avatar Dec 05 '25 01:12 blackboxsw

Update autopkgtest 5.53 is released to resolute. and daily images now contain cloud-init 25.4~1gcb12e00e-0ubuntu2 which avoids creating invalid YAML in /etc/cloud/cloud.cfg.d/90_dpkg_local_cloud_config.cfg. This can now merge when conflicts are resolved.

blackboxsw avatar Dec 17 '25 21:12 blackboxsw