Hash sum mismatch during packages
module run if primary APT source was changed by apt
module
#5921
Labels
packages
module run if primary APT source was changed by apt
module
#5921
Bug report
If the
apt
module of cloud-init is used to modify the primary APT source URI, and thepackages
module is configured to install packages, a series of errors can be seen, such asHash sum mismatch
andUnexpected file size
. This is caused bypackage_update
defaulting tofalse
, meaning that the local APT state contains package lists from a mirror other than the one being queried. If these mirrors aren't perfectly synchronised, errors such as these will appear, and packages will fail to install.Steps to reproduce the problem
Boot the minimal Ubuntu 24.04 image using the following
cloud-config
example (results may vary depending on the sync state of the alternate chosen mirror):This is in contrast to the following
cloud-config
, which works perfectly every time:Environment details
cloud-init logs
The text was updated successfully, but these errors were encountered: