Comment 24 for bug 1999640

Revision history for this message
Alan Baghumian (alanbach) wrote :

I hit this bug while upgrading nova-compute units from Focal to Jammy.

$ juju upgrade-series 8 prepare jammy
WARNING: This command will mark machine "8" as being upgraded to series "jammy".
This operation cannot be reverted or canceled once started.
Units running on the machine will also be upgraded. These units include:
  - canonical-livepatch/4
  - ceph-osd-nvme/5
  - lds-client-focal/16
  - nova-compute/5
  - ntp/0
  - ovn-chassis/3
  - telegraf/1

Leadership for the following applications will be pinned and not
subject to change until the "complete" command is run:
  - canonical-livepatch
  - ceph-osd-nvme
  - lds-client-focal
  - nova-compute
  - ntp
  - ovn-chassis
  - telegraf

Continue [y/N]?y
ERROR empty id not valid

Digging deeper, showed ntp is missing the charm-id:

juju:PRIMARY> db.applications.find({"model-uuid" : "98f30d5a-977c-4ce9-80ef-c97152b096f0"}, { "charm-origin.id": 1 });
...
...
{ "_id" : "98f30d5a-977c-4ce9-80ef-c97152b096f0:ntp", "charm-origin" : { "id" : "" } }
...
...

Found the charm id here:

$ juju info ntp
name: ntp
publisher: NTP charm developers
summary: Network Time Protocol
description: |
  NTP, the Network Time Protocol, is used to keep computer clocks accurate
  by synchronizing them over the Internet or a local network, or by
  following an accurate hardware receiver that interprets GPS, DCF-77,
  NIST or similar time signals.
  .
  This charm can be deployed alongside principal charms to enable NTP
  management across deployed services.
store-url: https://charmhub.io/ntp
charm-id: SLOkZHn8HVy160M2oJdvXatzlu7ZBEVx
supports: jammy, focal, bionic, xenial, trusty
subordinate: true
relations:
  provides:
    nrpe-external-master: nrpe-external-master
    ntpmaster: ntp
  requires:
    juju-info: juju-info
    master: ntp
channels: |
  latest/stable: cs-ntp-team-ntp-4-171-g669ff59 2022-08-29 (50) 5MB
  latest/candidate: cs-ntp-team-ntp-4-171-g669ff59 2022-08-29 (50) 5MB
  latest/beta: ↑
  latest/edge: ↑

Then updated the database:

juju:PRIMARY> db.applications.update({"_id" : "98f30d5a-977c-4ce9-80ef-c97152b096f0:ntp"}, { $set: { "charm-origin.id": "SLOkZHn8HVy160M2oJdvXatzlu7ZBEVx" } });
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })

That let me proceed with the series upgrade.