Commit 68be221
authored
Merge pull request juju#10348 from hpidcock/1832779-command-fails-no-active-controller
juju#10348
## Description of change
`juju upgrade-controller -c <controller-name>` previously would error when there isn't a current-controller set.
Additionally, when upgrading an IAAS controller, it would previously upgrade the current-controller, even though the controller specified in the command was different.
## QA steps
Quick test:
Bootstrap to an IAAS (not k8s) e.g. `juju bootstrap localhost`
Remove the current-controller line from `controllers.yaml`.
Run `juju upgrade-controller -c localhost-localhost`
It should not error with `ERROR No selected controller.`
Additional test:
Bootstrap 2 controllers with an old version.
Check which controller is the current-controller.
`juju upgrade-controller -c <not-the-current-controller>`
Check that the current-controller is still using the old version.
## Documentation changes
N/A
## Bug reference
[https://bugs.launchpad.net/juju/+bug/1832779](https://bugs.launchpad.net/juju/+bug/1832779)File tree
2 files changed
+54
-1
lines changed- cmd/juju/commands
2 files changed
+54
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
272 | 278 | | |
273 | 279 | | |
274 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
118 | 165 | | |
119 | 166 | | |
120 | 167 | | |
| |||
0 commit comments