remove-application regression on 2.1 -> 2.2 upgrade with subordinates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Christian Muirhead |
Bug Description
Removing an application from a model upgraded from 2.1.1 to 2.2.0 is sometimes impossible. remove-application succeeds, but the application never goes away.
Steps to reproduce:
# Start with a 2.1.1 controller, deploy two principals and two subordinates.
juju add-model test
juju deploy cs:ubuntu # machine 0
juju deploy cs:ubuntu ubuntu2 # machine 1
juju deploy cs:canonical-
juju deploy cs:nrpe
juju add-unit -n1 ubuntu # machine 2
juju add-unit -n1 ubuntu2 # machine 3
# Wait for stability.
# Relate each subordinate to each principal and the other subordinate.
juju add-relation canonical-livepatch nrpe
juju add-relation canonical-livepatch ubuntu
juju add-relation canonical-livepatch ubuntu2
juju add-relation nrpe ubuntu
juju add-relation nrpe ubuntu2
# Wait for stability.
# Upgrade the controller and app models to 2.2.0.
juju upgrade-juju -m controller --agent-
juju upgrade-juju
# Remove both machines from the ubuntu2 service (work around bug #1686696).
juju remove-machine --force 1
juju remove-machine --force 3
# Wait until both machines are gone and the ubuntu2 app is waiting and 0.
# Try to remove the ubuntu2 application.
juju remove-application ubuntu2
# Argh why is the app still there it is empty and dying.
juju remove-application ubuntu2
# Hm this isn't good.
juju remove-application ubuntu2
# Argh. My model is plagued by a waiting app forever.
The ubuntu2 application and its subordinate relations are alive in the DB (but, at least on our affected prod model, the principal's relations to other principals are gone). Interestingly, the unitcounts on the remaining relations for the dying application are still more than a dozen, when there were only ever two units of the principal.
description: | updated |
Changed in juju: | |
milestone: | none → 2.2.1 |
importance: | Undecided → High |
status: | New → Triaged |
assignee: | nobody → Christian Muirhead (2-xtian) |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → In Progress |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
https:/ /pastebin. canonical. com/191371/ lists some scenarios I've tried. I'm not sure test3 was necessarily a good test.