https://bugs.launchpad.net/juju/+bug/1580418 added charm GC, but the archive blobs cached on the bootstrap node aren't cleared. PrepareStoreCharmUpload tries to create a unique charm revision by incrementing the maximum value found in the DB, but GC has obliterated all reference to charms unused by services, so it can end up reusing a revision that has existed in the past. When the unit agent asks the bootstrap agent for the archive by name, it looks it up in /var/lib/juju/charm-get-cache by name and returns the previous incarnation of that revision.
I think the root cause is a regression in 1.25.6.
https:/ /bugs.launchpad .net/juju/ +bug/1580418 added charm GC, but the archive blobs cached on the bootstrap node aren't cleared. PrepareStoreCha rmUpload tries to create a unique charm revision by incrementing the maximum value found in the DB, but GC has obliterated all reference to charms unused by services, so it can end up reusing a revision that has existed in the past. When the unit agent asks the bootstrap agent for the archive by name, it looks it up in /var/lib/ juju/charm- get-cache by name and returns the previous incarnation of that revision.