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.

Alex Kavanagh (ajkavanagh) wrote : | #1 |
Changed in charm-gnocchi: | |
status: | New → Incomplete |

Arif Ali (arif-ali) wrote : | #2 |
@alex @marton
I ran the config-changed hook in my lab (manually), to see if I can replicate. I was able to see in the log, where it says "Performing OpenStack upgrade to ussuri" as shown in [1].
I am presuming that a config-changed shouldn't be upgrading any packages?

Márton Kiss (marton-kiss) wrote : | #3 |
This site was deployed on Focal/Ussuri by default, and the openstack-origin was not changed.
Changed in charm-gnocchi: | |
status: | Incomplete → New |

Liam Young (gnuoy) wrote : | #4 |
This is down to some issue with the charm working out what release is deployed. Currently the charm on ussuri thinks its at train. This is partly down to the package codenames dict in the charm (it stops at train) and partly down to gnocchi not bumping the code major revision along with openstack releases.
Changed in charm-gnocchi: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Liam Young (gnuoy) |
Changed in charm-gnocchi: | |
assignee: | Liam Young (gnuoy) → nobody |
status: | In Progress → New |

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (master) | #5 |
Fix proposed to branch: master
Review: https:/
Changed in charm-gnocchi: | |
status: | New → In Progress |
Changed in charm-gnocchi: | |
assignee: | nobody → Edward Hope-Morley (hopem) |

Edward Hope-Morley (hopem) wrote : | #6 |
Changed in charms.openstack: | |
assignee: | nobody → Edward Hope-Morley (hopem) |
status: | New → In Progress |

Edward Hope-Morley (hopem) wrote : | #7 |
Some extra information about this bug is that it appears to only impact Openstack releases < Yoga since above that the installed release is obtained from /etc/openstack-

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (master) | #8 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 55f98e80e430b11
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (master) | #9 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit ce8fd528ed2fa01
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
Changed in charm-gnocchi: | |
status: | In Progress → Fix Committed |

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/caracal) | #10 |
Related fix proposed to branch: stable/caracal
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/bobcat) | #11 |
Related fix proposed to branch: stable/bobcat
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/antelope) | #12 |
Related fix proposed to branch: stable/antelope
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/caracal) | #13 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/caracal
commit b956245392babe6
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11
tags: | added: in-stable-caracal |
tags: | added: in-stable-bobcat |

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/bobcat) | #14 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/bobcat
commit 442fa364913afcb
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/antelope) | #15 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/antelope
commit eda7104667fa9db
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11
tags: | added: in-stable-antelope |

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/2024.1) | #16 |
Fix proposed to branch: stable/2024.1
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/2023.2) | #17 |
Fix proposed to branch: stable/2023.2
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/2023.1) | #18 |
Fix proposed to branch: stable/2023.1
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/2024.1) | #19 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2024.1
commit f69ea045d1cce09
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/2023.2) | #20 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.2
commit 4004ffbb2edf23b
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/2023.1) | #21 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.1
commit 871ca8fdd3708ff
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/zed) | #22 |
Related fix proposed to branch: stable/zed
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/yoga) | #23 |
Related fix proposed to branch: stable/yoga
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/zed) | #24 |
Fix proposed to branch: stable/zed
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/yoga) | #25 |
Fix proposed to branch: stable/yoga
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/zed) | #26 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/zed
commit 282e551d063f22b
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11
tags: | added: in-stable-zed |
tags: | added: in-stable-yoga |

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/yoga) | #27 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit 86f03182b7f8f5a
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/zed) | #28 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/zed
commit 90ba928ab6585dd
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/yoga) | #29 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit 661efc355c399d8
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/xena) | #30 |
Related fix proposed to branch: stable/xena
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/wallaby) | #31 |
Related fix proposed to branch: stable/wallaby
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/xena) | #32 |
Fix proposed to branch: stable/xena
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/wallaby) | #33 |
Fix proposed to branch: stable/wallaby
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/victoria) | #34 |
Fix proposed to branch: stable/victoria
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-gnocchi (stable/ussuri) | #35 |
Fix proposed to branch: stable/ussuri
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/xena) | #36 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit 56c5a5945946fe4
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11
tags: | added: in-stable-xena |

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/wallaby) | #37 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit e58bad36743ecd1
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11
tags: | added: in-stable-wallaby |

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/victoria) | #38 |
Related fix proposed to branch: stable/victoria
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/ussuri) | #39 |
Related fix proposed to branch: stable/ussuri
Review: https:/

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/xena) | #40 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit 3af9e06237c4b20
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/wallaby) | #41 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 5118071c2bf4125
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/ussuri) | #42 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit 5089c4d16c34939
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11
(cherry picked from commit e58bad36743ecd1
tags: | added: in-stable-ussuri |
tags: | added: in-stable-victoria |

OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/victoria) | #43 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit b96b5f80e78abe8
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 14:47:08 2024 +0100
Support same pkg version for multiple releases
It is possible for the version of a package to remain the same
across multiple releases of openstack so this adds support to
get_
If releases A, B and C have version N and we are on release B
this will return release C so that it does not look like there
is an upgrade necessary. The main change here that allows this
is to support matching major and minor version up to X.Y.Z as
opposed to previously only matching the major version X.
Modifies one unittest to fix compatibility from unittest.mock
to mock.
Related-Bug: #1973303
Change-Id: I138f61312efb72
(cherry picked from commit 55f98e80e430b11
(cherry picked from commit e58bad36743ecd1

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/victoria) | #44 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit d96323a8766ec12
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01

OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-gnocchi (stable/ussuri) | #45 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit 8a7147b3355f0d6
Author: Edward Hope-Morley <email address hidden>
Date: Tue Apr 23 12:39:27 2024 +0100
Update package version codenames
Codenames stopped at Train so this fills gap
all the way to Caracal as well as accounting
for releases that share the version. Where more
than one release shares the same version we set
the highest release as the named release for that
version to avoid unnecessary upgrades.
Closes-Bug: #1973303
Change-Id: I048921beb6aaa6
(cherry picked from commit ce8fd528ed2fa01
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.