[series-upgrade] openstack-origin interferes with upgrade-series complete hook
Bug #1934756 reported by
Alex Kavanagh
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gnocchi Charm |
Triaged
|
High
|
Unassigned |
Bug Description
The gnocchi charm goes into error if the openstack-origin is not set to 'distro' when the post-upgrade-series hook runs. There error is along the lines of "bionic-ussuri isn't a valid version for ..."
The gnocchi charm should not be checking the openstack-origin during a series upgrade.
EDIT(lourot): redacted description as this happen also when having only one Gnocchi unit, so isn't related to having one or several units.
tags: | added: series-upgrade |
To post a comment you must log in.
I can reproduce it by running the series-upgrade tests. [1] This is because the post-series-upgrade hook calls render_config() [2] which then calls upgrade_ if_available( ). At this point, the machine series is already `focal` but the openstack-origin is still `bionic-ussuri`, so this raises:
2021-11-30 13:27:51 INFO juju-log Performing OpenStack upgrade to ussuri. 0-post- series- upgrade- 907716844346076 9887 juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ __init_ _.py", line 74, in main dispatch( restricted= restricted_ mode) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 390, in dispatch other_handlers) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 359, in _invoke invoke( ) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charms/ reactive/ bus.py" , line 181, in invoke _action( *args) juju/agents/ unit-gnocchi- 0/charm/ reactive/ gnocchi_ handlers. py", line 120, in render_config class.upgrade_ if_available( args) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charms_ openstack/ charm/core. py", line 1160, in upgrade_ if_available run_upgrade( interfaces_ list=interfaces _list) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charms_ openstack/ charm/core. py", line 1144, in run_upgrade charm.do_ openstack_ pkg_upgrade( ) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charms_ openstack/ charm/core. py", line 1182, in do_openstack_ pkg_upgrade add_source( source, key) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charmhelpers/ fetch/ubuntu. py", line 708, in add_source juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charmhelpers/ fetch/ubuntu. py", line 804, in _add_cloud_ distro_ check is_ubuntu_ rel(cloud_ archive_ release, openstack_release) juju/agents/ unit-gnocchi- 0/.venv/ lib/python3. 8/site- packages/ charmhelpers/ fetch/ubuntu. py", line 818, in _verify_ is_ubuntu_ rel fetch.SourceCon figError: Invalid Cloud Archive release specified: bionic-ussuri on this Ubuntuversion (focal)
2021-11-30 13:27:51 DEBUG jujuc server.go:211 running hook tool "juju-log" for gnocchi/
2021-11-30 13:27:51 ERROR juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
charm_
File "/var/lib/
self.
File "/var/lib/
target_
File "/var/lib/
fetch.
File "/var/lib/
fn(*m.groups())
File "/var/lib/
_verify_
File "/var/lib/
raise SourceConfigError(
charmhelpers.
[1]: https:/ /github. com/openstack- charmers/ charmed- openstack- tester /github. com/openstack/ charm-gnocchi/ blob/master/ src/reactive/ gnocchi_ handlers. py#L120
[2]: https:/