failed to migrate binaries: charm local:focal/ubuntu-8 unexpectedly assigned local:focal/ubuntu-7

Bug #1983506 reported by Heather Lanigan
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan

Bug Description

$ juju deploy ./ubuntu_458c7bd.charm ubuntu-local
Located local charm "ubuntu", revision 0
Deploying "ubuntu-local" from local charm "ubuntu", revision 0 on focal
$ juju refresh --path ./ubuntu_458c7bd.charm ubuntu-local
Added local charm "ubuntu", revision 1, to the model
$ juju refresh --path ./ubuntu_458c7bd.charm ubuntu-local
Added local charm "ubuntu", revision 2, to the model
$ juju refresh --path ./ubuntu_458c7bd.charm ubuntu-local
Added local charm "ubuntu", revision 3, to the model
$ juju refresh --path ./ubuntu_458c7bd.charm ubuntu-local
Added local charm "ubuntu", revision 4, to the model
$ juju refresh --path ./ubuntu_458c7bd.charm ubuntu-local
Added local charm "ubuntu", revision 5, to the model
$ juju refresh --path ./ubuntu_458c7bd.charm ubuntu-local
Added local charm "ubuntu", revision 6, to the model

$ juju deploy ./ubuntu_458c7bd.charm ubuntu-local-local
Located local charm "ubuntu", revision 7
Deploying "ubuntu-local-local" from local charm "ubuntu", revision 7 on focal

## migration at this point is successful, there must be a space in the local charm revisions.

$ juju refresh --path ./ubuntu_458c7bd.charm ubuntu-local-local
Added local charm "ubuntu", revision 8, to the model

$ juju migrate series dst

Model Controller Cloud/Region Version SLA Timestamp Notes
series localhost-localhost localhost/localhost 2.9.32 unsupported 19:27:10Z migrating: aborted, removing model from target controller: model data transfer failed, failed to migrate binaries: charm local:focal/ubuntu-8 unexpectedly assigned local:focal/ubuntu-7

App Version Status Scale Charm Channel Rev Exposed Message
ubuntu 20.04 active 1 ubuntu stable 20 no
ubuntu-again 20.04 active 1 ubuntu stable 20 no
ubuntu-local 20.04 active 1 ubuntu 6 no
ubuntu-local-local 20.04 active 1 ubuntu 8 no

Unit Workload Agent Machine Public address Ports Message
ubuntu-again/0* active idle 3 10.74.147.41
ubuntu-local-local/0* active idle 2 10.74.147.115
ubuntu-local/0* active idle 1 10.74.147.30
ubuntu/0* active idle 0 10.74.147.77

Machine State Address Inst id Series AZ Message
0 started 10.74.147.77 juju-8e304f-0 focal Running
1 started 10.74.147.30 juju-8e304f-1 focal Running
2 started 10.74.147.115 juju-8e304f-2 focal Running
3 started 10.74.147.41 juju-8e304f-3 focal Running

Is specific to local charms.

Revision history for this message
Heather Lanigan (hmlanigan) wrote :

As long as the local charm revisions have no spaces, the model will migrate.

Workaround is to upgrade the local charms accordingly. Though the applications will never have the same revision, they just need to be sequential with no skips.

tags: added: sts
Changed in juju:
milestone: 2.9.34 → 2.9.35
Changed in juju:
milestone: 2.9.35 → 2.9.36
Revision history for this message
DUFOUR Olivier (odufourc) wrote :

Subscribing ~Field-High as it impacts a customer with large and many existing deployments and increase the difficulties for migration from Bionic to Focal controllers.
While there is a workaround, "upgrading" the charms is not perfect since it can trigger as well unwanted hooks/slight outages on production.

Changed in juju:
milestone: 2.9.36 → 2.9.37
Changed in juju:
milestone: 2.9.37 → 2.9.38
Changed in juju:
milestone: 2.9.38 → 2.9.39
Changed in juju:
assignee: nobody → Heather Lanigan (hmlanigan)
Changed in juju:
milestone: 2.9.39 → 2.9.40
Revision history for this message
John A Meinel (jameinel) wrote :

So changing the target is still going to cause the charm to trigger 'upgrade' hooks, because the 'target of the charm' has changed.
Juju doesn't have an independent tracking of "this is the exact content of the charm and it isn't changing".
So while we want to fix being able to target a charm revision that has the same number, we aren't looking to address the "be able to change the target without actually triggering charm hooks".

To address the latter would be a rather major database and agent update, which likely would trigger a hook as we change from 'tracking A' to 'tracking B which is more stable', and not leave us in a hugely better place, as we don't envision a follow up to Charmhub that makes revisions become less stable.

Revision history for this message
John A Meinel (jameinel) wrote :

Sorry, I had mixed this bug with another one. For "local" charms, you should, indeed, be able to migrate regardless of the local revisions for the applications.

Changed in juju:
milestone: 2.9.40 → 2.9.41
Changed in juju:
milestone: 2.9.41 → 2.9.42
Changed in juju:
milestone: 2.9.42 → 2.9.43
Changed in juju:
milestone: 2.9.43 → 2.9.44
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Heather Lanigan (hmlanigan) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.