juju models doesn't honor $JUJU_MODEL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Medium
|
Unassigned | ||
2.0 |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce:
1) create 2 models
juju add-model m1
juju add-model m2
2) switch to model m1
juju switch m1
3) set env variable JUJU_MODEL to use m2
export JUJU_MODEL=m2
4) List models
juju models
Expected result:
Controller: freyes
Model Cloud/Region Status Machines Cores Access Last connection
controller xxx/xxx available 1 2 admin just now
m2* xxx/xxx available 18 41 admin 2017-02-13
m1 xxx/xxx available 12 17 admin 1 minute ago
Actual result:
Controller: freyes
Model Cloud/Region Status Machines Cores Access Last connection
controller xxx/xxx available 1 2 admin just now
m2 xxx/xxx available 18 41 admin 2017-02-13
m1* xxx/xxx available 12 17 admin 1 minute ago
juju models should print in green 'm2' and append '*'
Changed in juju: | |
status: | New → Incomplete |
I just noticed that 'juju switch' (without arguments) shows this same problem, from the help description: "Selects or **identifies** the current controller and model" (emphasis mine), so it would be expected that it prints the controller:model that juju commands will use in the absence of "-m MODEL"