Comment 2 for bug 2026651

Revision history for this message
Boris Lukashev (rageltman) wrote (last edit ):

Looks like the "source" config attribute is causing this - the YAML had it set to distro since the old charms were deprecated. Attempting to change the config breaks the hooks and then it cant tell what version it had or to which version it's going.
```
unit-ceph-mon-1: 20:44:21 ERROR unit.ceph-mon/1.juju-log Invalid upgrade path from None to None. Valid paths are: ['firefly -> hammer', 'hammer -> jewel', 'jewel -> luminous', 'luminous -> mimic', 'mimic -> nautilus', 'nautilus -> octopus']
```
and then the config breaks entirely and now the cluster is in some even weirder state:
```
unit-ceph-mon-1: 21:26:42 INFO juju.worker.uniter awaiting error resolution for "config-changed" hook
unit-ceph-mon-0: 21:26:42 INFO juju.worker.uniter awaiting error resolution for "config-changed" hook
unit-ceph-mon-0: 21:26:42 INFO unit.ceph-mon/0.juju-log old_version: None
unit-ceph-mon-0: 21:26:42 INFO unit.ceph-mon/0.juju-log new_version: None
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed Traceback (most recent call last):
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/config-changed", line 1351, in <module>
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed hooks.execute(sys.argv)
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/charmhelpers/core/hookenv.py", line 962, in execute
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed self._hooks[hook_name]()
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 93, in _harden_inner2
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed return f(*args, **kwargs)
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/config-changed", line 248, in config_changed
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed check_for_upgrade()
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed File "/var/lib/juju/agents/unit-ceph-mon-0/charm/hooks/config-changed", line 144, in check_for_upgrade
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed old_version_os < new_version_os):
unit-ceph-mon-0: 21:26:42 WARNING unit.ceph-mon/0.config-changed TypeError: '<' not supported between instances of 'NoneType' and 'str'
unit-ceph-mon-0: 21:26:43 ERROR juju.worker.uniter.operation hook "config-changed" (via explicit, bespoke hook script) failed: exit status 1
```
^^ this fine mess requires editing /var/lib/juju/agents/unit-ceph-mon-*/charm/.juju-persistent-config to restore the "source" attribute manually or the hooks scripts "pile up" until that's fixed.

It looks like ceph-mon charm _cannot convert from "distro" to "cloud:focal-xena"_ without somewhat silently breaking.
This doesnt bode too well for the production deployment which is using the old juju charmers charms which are now unsupported.