Skip to content

t/a-buildvm-ubuntu-cloud: install 'ubuntu-minimal' and autoremove extra packages

Without installing 'ubuntu-minimal', the dpkg database is left in a state where a bunch of packages like iproute2 or netplan.io can be autoremoved, which will happen if subsequent test on that image use -U, further breaking the testbed if a reboot is triggered after that (like not networking at all). The --autoremove option to the purge cloud-init will ensure that no leftovers are kept, like a bunch a Python modules that cloud-init pulls.

On Trusty with the apt-get purge --autoremove, the following error shows: E: Command line option --autoremove is not understood The %(autoremove)s workaround unfortunately has the limitation of keeping a few extra packages pulled by cloud-init on Trusty images, like software-properties-common, but has the advantage of being quite simple. Once Trusty is truly EOL, the workaround can be removed, because every release up to Xenial support the flag.

Merge request reports

Loading