I think I managed to reproduce this on ceph-mon (single unit). Logs after changing openstack-origin from cloud:focal-victoria to cloud:focal-wallaby: ``` unit-ceph-mon-0: 12:13:39 INFO juju.worker.uniter.operation ran "update-status" hook (via explicit, bespoke hook script) unit-ceph-mon-0: 12:18:12 INFO unit.ceph-mon/0.juju-log Updating status. unit-ceph-mon-0: 12:18:13 INFO juju.worker.uniter.operation ran "update-status" hook (via explicit, bespoke hook script) unit-ceph-mon-0: 12:23:08 INFO unit.ceph-mon/0.juju-log Updating status. unit-ceph-mon-0: 12:23:09 INFO juju.worker.uniter.operation ran "update-status" hook (via explicit, bespoke hook script) unit-ceph-mon-0: 12:25:30 INFO juju.worker.uniter found queued "upgrade-charm" hook unit-ceph-mon-0: 12:25:31 INFO unit.ceph-mon/0.juju-log Making dir /var/lib/charm/ceph-mon ceph:ceph 555 unit-ceph-mon-0: 12:25:35 INFO unit.ceph-mon/0.juju-log Installing [] with options: ['--option=Dpkg::Options::=--force-confold'] unit-ceph-mon-0: 12:25:36 WARNING unit.ceph-mon/0.upgrade-charm Unit /etc/systemd/system/ceph-create-keys.service is masked, ignoring. unit-ceph-mon-0: 12:25:38 WARNING unit.ceph-mon/0.upgrade-charm Error ENOENT: key 'autotune' doesn't exist unit-ceph-mon-0: 12:25:39 WARNING unit.ceph-mon/0.upgrade-charm set autotune unit-ceph-mon-0: 12:25:39 WARNING unit.ceph-mon/0.upgrade-charm 2024-07-17T02:55:39.880+0000 7f42733ca700 -1 auth: unable to find a keyring on /var/lib/ceph/mon/ceph-/keyring: (2) No such file or directory unit-ceph-mon-0: 12:25:39 WARNING unit.ceph-mon/0.upgrade-charm 2024-07-17T02:55:39.880+0000 7f42733ca700 -1 AuthRegistry(0x7f426c059290) no keyring found at /var/lib/ceph/mon/ceph-/keyring, disabling cephx unit-ceph-mon-0: 12:25:40 WARNING unit.ceph-mon/0.upgrade-charm exported keyring for client.glance unit-ceph-mon-0: 12:25:40 WARNING unit.ceph-mon/0.upgrade-charm updated caps for client.glance unit-ceph-mon-0: 12:25:41 WARNING unit.ceph-mon/0.upgrade-charm 2024-07-17T02:55:41.144+0000 7fdaff818700 -1 auth: unable to find a keyring on /var/lib/ceph/mon/ceph-/keyring: (2) No such file or directory unit-ceph-mon-0: 12:25:41 WARNING unit.ceph-mon/0.upgrade-charm 2024-07-17T02:55:41.144+0000 7fdaff818700 -1 AuthRegistry(0x7fdaf8059290) no keyring found at /var/lib/ceph/mon/ceph-/keyring, disabling cephx unit-ceph-mon-0: 12:25:41 WARNING unit.ceph-mon/0.upgrade-charm exported keyring for client.cinder-ceph unit-ceph-mon-0: 12:25:41 WARNING unit.ceph-mon/0.upgrade-charm updated caps for client.cinder-ceph unit-ceph-mon-0: 12:25:42 WARNING unit.ceph-mon/0.upgrade-charm 2024-07-17T02:55:42.392+0000 7fdce6db4700 -1 auth: unable to find a keyring on /var/lib/ceph/mon/ceph-/keyring: (2) No such file or directory unit-ceph-mon-0: 12:25:42 WARNING unit.ceph-mon/0.upgrade-charm 2024-07-17T02:55:42.392+0000 7fdce6db4700 -1 AuthRegistry(0x7fdce0059290) no keyring found at /var/lib/ceph/mon/ceph-/keyring, disabling cephx unit-ceph-mon-0: 12:25:42 WARNING unit.ceph-mon/0.upgrade-charm exported keyring for client.nova-compute unit-ceph-mon-0: 12:25:43 WARNING unit.ceph-mon/0.upgrade-charm updated caps for client.nova-compute unit-ceph-mon-0: 12:25:44 INFO juju.worker.uniter.operation ran "upgrade-charm" hook (via explicit, bespoke hook script) unit-ceph-mon-0: 12:25:45 INFO juju.worker.uniter found queued "config-changed" hook unit-ceph-mon-0: 12:25:46 INFO unit.ceph-mon/0.juju-log old_version: pacific unit-ceph-mon-0: 12:25:46 INFO unit.ceph-mon/0.juju-log new_version: pacific unit-ceph-mon-0: 12:25:46 ERROR unit.ceph-mon/0.juju-log Invalid upgrade path from pacific to pacific. Valid paths are: ['firefly -> hammer', 'hammer -> jewel', 'jewel -> luminous', 'luminous -> mimic', 'mimic -> nautilus', 'nautilus -> octopus', 'octopus -> pacific', 'pacific -> quincy'] unit-ceph-mon-0: 12:25:46 INFO unit.ceph-mon/0.juju-log Monitor hosts are ['10.5.1.213'] unit-ceph-mon-0: 12:25:46 INFO unit.ceph-mon/0.juju-log Making dir /var/lib/charm/ceph-mon ceph:ceph 555 unit-ceph-mon-0: 12:25:47 WARNING unit.ceph-mon/0.config-changed 2024-07-17T02:55:47.044+0000 7fe5bcdc7700 -1 auth: unable to find a keyring on /var/lib/ceph/mon/ceph-/keyring: (2) No such file or directory unit-ceph-mon-0: 12:25:47 WARNING unit.ceph-mon/0.config-changed 2024-07-17T02:55:47.044+0000 7fe5bcdc7700 -1 AuthRegistry(0x7fe5b8059290) no keyring found at /var/lib/ceph/mon/ceph-/keyring, disabling cephx unit-ceph-mon-0: 12:25:47 WARNING unit.ceph-mon/0.config-changed exported keyring for client.glance unit-ceph-mon-0: 12:25:47 WARNING unit.ceph-mon/0.config-changed updated caps for client.glance unit-ceph-mon-0: 12:25:48 WARNING unit.ceph-mon/0.config-changed 2024-07-17T02:55:48.260+0000 7f54ba1e0700 -1 auth: unable to find a keyring on /var/lib/ceph/mon/ceph-/keyring: (2) No such file or directory unit-ceph-mon-0: 12:25:48 WARNING unit.ceph-mon/0.config-changed 2024-07-17T02:55:48.260+0000 7f54ba1e0700 -1 AuthRegistry(0x7f54b4059290) no keyring found at /var/lib/ceph/mon/ceph-/keyring, disabling cephx unit-ceph-mon-0: 12:25:48 WARNING unit.ceph-mon/0.config-changed exported keyring for client.cinder-ceph unit-ceph-mon-0: 12:25:48 WARNING unit.ceph-mon/0.config-changed updated caps for client.cinder-ceph unit-ceph-mon-0: 12:25:49 WARNING unit.ceph-mon/0.config-changed 2024-07-17T02:55:49.316+0000 7fddb9673700 -1 auth: unable to find a keyring on /var/lib/ceph/mon/ceph-/keyring: (2) No such file or directory unit-ceph-mon-0: 12:25:49 WARNING unit.ceph-mon/0.config-changed 2024-07-17T02:55:49.316+0000 7fddb9673700 -1 AuthRegistry(0x7fddb4059290) no keyring found at /var/lib/ceph/mon/ceph-/keyring, disabling cephx unit-ceph-mon-0: 12:25:49 WARNING unit.ceph-mon/0.config-changed exported keyring for client.nova-compute unit-ceph-mon-0: 12:25:50 WARNING unit.ceph-mon/0.config-changed updated caps for client.nova-compute unit-ceph-mon-0: 12:25:52 INFO juju.worker.uniter.operation ran "config-changed" hook (via explicit, bespoke hook script) unit-ceph-mon-0: 12:26:27 INFO unit.ceph-mon/0.juju-log Updating status. unit-ceph-mon-0: 12:29:31 INFO unit.ceph-mon/0.juju-log Updating status. unit-ceph-mon-0: 12:29:32 INFO juju.worker.uniter.operation ran "update-status" hook (via explicit, bespoke hook script) ``` - "Invalid upgrade path" is not expected here. The `old_version` _should_ be interpreted as octopus, as that is what was configured and is installed. - "unable to find a keyring" is suspicious, because the path is `/var/lib/ceph/mon/ceph-/keyring` - note the `ceph-` segment. - the actual path is `/var/lib/ceph/mon/ceph-juju-2b5f93-openstack-0/keyring`. - hostname is `juju-2b5f93-openstack-0` - maybe some templating failed to get the hostname in the charm? - `'/var/lib/ceph/mon/ceph-{}/keyring'.format( socket.gethostname())` hmmm - used in: - create_named_keyring(entity, name, caps=None) - ceph_auth_get(key_name) - get_named_key(name, caps=None, pool_list=None) - create_keyrings() The 'unable to find a keyring' was a red herring - not a bug in where the charm is calling it. the charm is correctly setting the path, and when I run the command manually this is what I see: ``` ubuntu@juju-2b5f93-openstack-0:~$ sudo -u ceph ceph --name mon. --keyring /var/lib/ceph/mon/ceph-juju-2b5f93-openstack-0/keyring auth get client.glance 2024-07-17T04:38:45.189+0000 7faa24ff9700 -1 auth: unable to find a keyring on /var/lib/ceph/mon/ceph-/keyring: (2) No such file or directory 2024-07-17T04:38:45.189+0000 7faa24ff9700 -1 AuthRegistry(0x7faa2005bb18) no keyring found at /var/lib/ceph/mon/ceph-/keyring, disabling cephx [client.glance] key = AQACvJRmExl/KRAAYdy36jS7q8WhJ6dR5xv14Q== caps mon = "allow r; allow command \"osd blacklist\"; allow command \"osd blocklist\"" caps osd = "allow rwx" exported keyring for client.glance ``` So possibly more of an issue within ceph itself? maybe something to do with the config `keyring = /var/lib/ceph/mon/$cluster-$id/keyring` in ceph.conf - $id not defined? ``` $ juju ssh ceph-mon/0 cat /etc/apt/sources.list.d/cloud-archive.list # Ubuntu Cloud Archive deb http://ubuntu-cloud.archive.canonical.com/ubuntu focal-updates/victoria main $ juju exec -a ceph-mon -- 'apt list --installed | grep ceph-common' ceph-common/focal-updates,focal-security,now 15.2.17-0ubuntu0.20.04.6 amd64 [installed,automatic] python3-ceph-common/focal-updates,focal-security,now 15.2.17-0ubuntu0.20.04.6 all [installed,automatic] $ juju ssh ceph-mon/0 sudo ceph --version ceph version 15.2.17 (8a82819d84cf884bd39c17e3236e0632ac146dc4) octopus (stable) Connection to 10.5.1.213 closed. ``` - ceph-mon has not updated the cloud archive ppa on disk - it should be wallaby --- if I toggle the `source` back to cloud:focal-victoria, then back to cloud:focal-wallaby, it correctly upgrades. The log also shows: ``` unit-ceph-mon-0: 14:06:20 INFO unit.ceph-mon/0.juju-log old_version: octopus unit-ceph-mon-0: 14:06:20 INFO unit.ceph-mon/0.juju-log new_version: pacific unit-ceph-mon-0: 14:06:20 INFO unit.ceph-mon/0.juju-log octopus to pacific is a valid upgrade path. Proceeding. ``` So maybe the issue more in how it determines the `old_version`? I don't think that would affect writing the updated ppa to disk though?