[2.5beta1] juju switch allows switching to non-existent model
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Anastasia | ||
2.4 |
Fix Released
|
High
|
Anastasia |
Bug Description
After destroying a model, the `juju switch` command unexpectedly succeeds in switching to the model which no longer exists. It is as if a model refresh is not happening ahead of the switch operation.
This condition was introduced some time between stable (2.4.4) and edge (2.5), and it is preventing OpenStack Charms CI from adopting Juju 2.5 in automation and test gates.
---
(clients) jenkins@
name: juju
summary: juju client
publisher: Canonical✓
contact: http://
license: unset
description: |
Through the use of charms, juju provides you with shareable, re-usable, and repeatable expressions
of devops best practices.
commands:
- juju
snap-id: e2CPHpB1fUxcKtC
tracking: edge
refresh-date: today at 19:45 UTC
channels:
stable: 2.4.4 (5426) 58MB classic
candidate: 2.4.5+2.4-94045a7 (5611) 63MB classic
beta: ↑
edge: 2.5-beta1+
2.4/stable: 2.4.4 (5426) 58MB classic
2.4/candidate: ↑
2.4/beta: ↑
2.4/edge: ↑
2.3/stable: 2.3.9 (5267) 55MB classic
2.3/candidate: ↑
2.3/beta: ↑
2.3/edge: 2.3.10+2.3-235656c (5618) 55MB classic
installed: 2.5-beta1+
(clients) jenkins@
Use --refresh flag with this command to see the latest information.
Controller Model User Access Cloud/Region Models Machines HA Version
auto-osci-sv07* auto-osci-sv07 admin superuser serverstack/
(clients) jenkins@
Controller: auto-osci-sv07
Model Cloud/Region Status Machines Cores Access Last connection
auto-osci-sv07* serverstack/
controller serverstack/
default serverstack/
(clients) jenkins@
WARNING! This command will destroy the "auto-osci-sv07" model.
This includes all machines, applications, data and other resources.
Continue [y/N]? y
Destroying model
Waiting on model to be removed...
Model destroyed.
(clients) jenkins@
Controller: auto-osci-sv07
Model Cloud/Region Status Machines Cores Access Last connection
controller serverstack/
default serverstack/
(clients) jenkins@
auto-osci-
(clients) jenkins@
Controller: auto-osci-sv07
Model Cloud/Region Status Machines Cores Access Last connection
controller serverstack/
default serverstack/
(clients) jenkins@
summary: |
- [2.5beta1] re-using model name is broken + [2.5beta1] juju switch allows switching to non-existent model |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.5-beta1 |
assignee: | nobody → Anastasia (anastasia-macmood) |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Tried juju controllers --refresh to see if that would update things, but no. It still succeed in switching to a non-existent model:
(clients) jenkins@ juju-001b34- osci-18: ~/tools/ 0/charm- test-infra$ juju models
Controller: auto-osci-sv07
Model Cloud/Region Status Machines Cores Access Last connection serverstack available 1 4 admin just now serverstack available 0 - admin 5 hours ago
controller serverstack/
default serverstack/
(clients) jenkins@ juju-001b34- osci-18: ~/tools/ 0/charm- test-infra$ juju controllers --refresh serverstack 2 1 none 2.5-beta1
Controller Model User Access Cloud/Region Models Machines HA Version
auto-osci-sv07* auto-osci-sv07 admin superuser serverstack/
(clients) jenkins@ juju-001b34- osci-18: ~/tools/ 0/charm- test-infra$ juju switch auto-osci- sv07:auto- osci-sv07 sv07:admin/ auto-osci- sv07 (no change)
auto-osci-
(clients) jenkins@ juju-001b34- osci-18: ~/tools/ 0/charm- test-infra$ echo $?
0