config-changed hook caused a package upgrade on gnocchi unit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gnocchi Charm |
Fix Committed
|
High
|
Edward Hope-Morley | ||
charms.openstack |
In Progress
|
Undecided
|
Edward Hope-Morley |
Bug Description
On a customer environment where they would like to make the package upgrades part of a separate and planned operations with Landscape, we saw that a trigger of config-changed hook fired an apt-dist upgrade and upgraded the packages.
unit-gnocchi-log.0:
2022-05-10 12:04:09 INFO juju-log Reactive main running for hook config-changed
2022-05-10 12:04:09 INFO juju-log Invoking reactive handler: reactive/
2022-05-10 12:04:10 INFO juju-log Performing OpenStack upgrade to ussuri.
2022-05-10 12:04:12 INFO juju-log Upgrading with options: ['--option', 'Dpkg::
2022-05-10 12:04:59 INFO juju-log Installing ['gnocchi-api', 'gnocchi-metricd', 'python3-apt', 'ceph-common', 'python3-rados', 'python3-
/var/log/
Start-Date: 2022-05-10 12:04:14
Commandline: apt-get --assume-yes --option Dpkg::Options:
https:/
The config changed hook is calling the render_config() and it is doing a package upgrade. The config-changed hook was caused by a juju controller upgrade. Ideally it would be great to separate the package upgrades from the config changed hooks.
Changed in charm-gnocchi: | |
status: | Incomplete → New |
Changed in charm-gnocchi: | |
assignee: | Liam Young (gnuoy) → nobody |
status: | In Progress → New |
Changed in charm-gnocchi: | |
assignee: | nobody → Edward Hope-Morley (hopem) |
I'm slightly confused by this. Was this with action- managed- upgrade= false (default), and a change to the openstack-origin from what was currently installed?
It looks like the charm was processing an OpenStack upgrade (which would be true if the openstack-origin specified a different OpenStack version than that which was installed), but would be a bug if the openstack-origin hadn't been changed. The call to "upgrade_ if_availble( )" should be a no-op if no upgrade is 'requested' via the openstack-origin.
Thanks.