Ensure openstack-release package is correct after install hook
The linked bug shows the install of the charm with openstack-origin set
to zed. This happens because configure_installation_source() causes the
openstack-release package to be installed *before* the zed cloud archive
sources are configured into /etc/apt and an apt update done. This means
that the openstack-release package says "yoga" despite the zed packages
actually being installed.
Then, on the config-changed hook, it sees that the installed version is
showing as yoga and tries to do an upgrade. This fails, as the charm
hasn't yet bootstrapped, and the charm tries to bootstrap after
upgrading the packages.
There's a few bugs here which are exposed, but the tactical fix is to
force the openstack-release to match the installed packages.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- nova-cloud- controller/ +/860299 /opendev. org/openstack/ charm-nova- cloud-controlle r/commit/ abb8ee551c0abc9 1c986f2a8482c74 62cd7a8e39
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit abb8ee551c0abc9 1c986f2a8482c74 62cd7a8e39
Author: Corey Bryant <email address hidden>
Date: Tue Oct 4 15:23:55 2022 +0000
Ensure openstack-release package is correct after install hook
The linked bug shows the install of the charm with openstack-origin set installation_ source( ) causes the release package to be installed *before* the zed cloud archive
to zed. This happens because configure_
openstack-
sources are configured into /etc/apt and an apt update done. This means
that the openstack-release package says "yoga" despite the zed packages
actually being installed.
Then, on the config-changed hook, it sees that the installed version is
showing as yoga and tries to do an upgrade. This fails, as the charm
hasn't yet bootstrapped, and the charm tries to bootstrap after
upgrading the packages.
There's a few bugs here which are exposed, but the tactical fix is to
force the openstack-release to match the installed packages.
Closes-Bug: #1989538 a18fd49997c5f5b 0540d583f40
Change-Id: Icdef04e25e74c0