feat: add autopkgtests assert no warnings from cloud-init status
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:
- 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
- Awaiting upstream fix[2] for autopkgtest to stop creating
deprecated apt_preserve_sources_listkeys 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>)
cc @dbungert for visibility in case of autopkgtest input/suggestions.
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.