[series-upgrade] openstack-origin interferes with upgrade-series complete hook

Bug #1934756 reported by Alex Kavanagh
10
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
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

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.
2021-11-30 13:27:51 DEBUG jujuc server.go:211 running hook tool "juju-log" for gnocchi/0-post-series-upgrade-9077168443460769887
2021-11-30 13:27:51 ERROR juju-log Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-gnocchi-0/charm/reactive/gnocchi_handlers.py", line 120, in render_config
    charm_class.upgrade_if_available(args)
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 1160, in upgrade_if_available
    self.run_upgrade(interfaces_list=interfaces_list)
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 1144, in run_upgrade
    target_charm.do_openstack_pkg_upgrade()
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charms_openstack/charm/core.py", line 1182, in do_openstack_pkg_upgrade
    fetch.add_source(source, key)
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 708, in add_source
    fn(*m.groups())
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 804, in _add_cloud_distro_check
    _verify_is_ubuntu_rel(cloud_archive_release, openstack_release)
  File "/var/lib/juju/agents/unit-gnocchi-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 818, in _verify_is_ubuntu_rel
    raise SourceConfigError(
charmhelpers.fetch.SourceConfigError: Invalid Cloud Archive release specified: bionic-ussuri on this Ubuntuversion (focal)

[1]: https://github.com/openstack-charmers/charmed-openstack-tester
[2]: https://github.com/openstack/charm-gnocchi/blob/master/src/reactive/gnocchi_handlers.py#L120

Changed in charm-gnocchi:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

Attaching juju crashdump of a tweaked series-upgrade test run with only one single Gnocchi unit.

description: updated
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :
Revision history for this message
Mathew Clarke (matclarke) wrote :

I believe this can be fixed by running the following juju command

juju config gnocchi openstack-origin=distro

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.