Migrating model fails due to missing unit for leader, however such application doesn't exist in model anymore

Bug #2004151 reported by Diko Parvanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

Migrating model from 2.9.37 controller to a new 2.9.38 fails with:

machine-0: 10:48:08 INFO juju.worker.migrationmaster.55ab2e aborted, removing model from target controller: model data transfer failed, model export failed: missing unit for leader "nrpe-lxd/18" not valid (not valid)

However this application has been removed some time ago

juju show-application nrpe-lxd
{}
ERROR application "nrpe-lxd" not found

Juju shouldn't block migrations on missing leaders for applications that do not exist anymore.

Revision history for this message
Diko Parvanov (dparv) wrote :

Worked around this by using https://bugs.launchpad.net/juju/+bug/1890072

juju_revoke_lease -m 55ab2ebd-6e66-4d23-8549-aee9f03fae13 -l nrpe-lxd

Changed in juju:
importance: Undecided → High
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Without knowing some history of the model and application, it's difficult to find why the leader wasn't removed.

I've been trying simple reproducers without success.

Changed in juju:
importance: High → Medium
status: New → Triaged
Revision history for this message
Joseph Phillips (manadart) wrote :

The only way I can think of this happening is if that unit was on a machine undergoing a series upgrade, whereupon in was pinned as the leader.

If such a machine gets destroyed without completing the upgrade, and the unit goes with it, we never unpin it as leader.

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.