Deployed charm contains future revision code
This bug report will be marked for expiration in 15 days if no further activity occurs. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Incomplete
|
High
|
Unassigned |
Bug Description
We observed a bug in juju 3.1.6 / openstack cloud where a machine charm unit contained code that should not be included in the current revision of the charm.
The initial situation was a deployed github runner (charmhub.
The deployment steps were:
1. Deploy (using juju terraform provider) with a terraform plan that moves A to revision 141. The same terraform plan moves B from latest/edge rev 141 to 145.
2. After successfully applying, A's juju status shows that it's on revision 141 latest/stable, the charm is in active/idle state, and the juju debug log output shows that the correct charm file is being downloaded:
$ zgrep 'from API server' /var/log/
2024-03-28 10:51:53 INFO juju.worker.
3. ssh into a unit of A. The unit contains code introduced in rev 143.
Post-mortem analysis shows that if we run `juju download github-runner --revision 141`, the downloaded charm file contains the correct code (not code from a future revision).
It may also be worth mentioning that the charm rev 141 was promoted to stable just before the deployment (the deployment was on 28 March and the promotion of the rev to stable also https:/
The same bug was observed in January and reported to the juju matrix channel: https:/
`juju info github-runner` tells me:
channels: |
latest/stable: 141 2024-03-28 (141) 20MB amd64 ubuntu@22.04
latest/candidate: ↑
latest/beta: 145 2024-03-28 (145) 20MB amd64 ubuntu@22.04
latest/edge: 145 2024-03-25 (145) 20MB amd64 ubuntu@22.04
So I have the question about "140 is the latest/stable revision" as I can't see how that would be true.
Is the issue that there was an application A that at the time it was deployed, latest/stable was at revision 140, but now latest/stable is at 141?
And that at the point application B was deployed from latest/edge at 141, but it is now at 145?