Removing a Cloud from juju generates an error message, but also removes it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Achilleas Anagnostopoulos |
Bug Description
Removing a local Cloud from client and controller removes it, but also outputs an error message. As a user, I expect it to work successfully or fail gracefully not an in between state.
"microk8s" cloud is there:
```
$ juju list-clouds
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
Clouds available on the controller:
Cloud Regions Default Type
my-k8s 0 k8s
Clouds available on the client:
Cloud Regions Default Type Credentials Source Description
localhost 1 localhost lxd 0 built-in LXD Container Hypervisor
microk8s 1 localhost k8s 0 local A Kubernetes Cluster
minikube 0 k8s 0 local A Kubernetes Cluster
my-k8s 0 k8s 1 local A Kubernetes Cluster
mycluster 1 localhost k8s 0 local A Kubernetes Cluster
```
Removing it:
```
$ juju remove-cloud microk8s
This operation can be applied to both a copy on this client and to the one on a controller.
Do you want to remove cloud microk8s from:
1. client only (--client)
2. controller "my-k8s" only (--controller my-k8s)
3. both (--client --controller my-k8s)
Enter your choice, or type Q|q to quit: 3
Removed details of cloud "microk8s" from the client
ERROR cloud "microk8s" not found
```
Outputs a successful message AND an error:
```
$ juju list-clouds
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
Clouds available on the controller:
Cloud Regions Default Type
my-k8s 0 k8s
Clouds available on the client:
Cloud Regions Default Type Credentials Source Description
localhost 1 localhost lxd 0 built-in LXD Container Hypervisor
my-k8s 0 k8s 1 local A Kubernetes Cluster
mycluster 1 localhost k8s 0 local A Kubernetes Cluster
```
Output status is also an error:
```
$ echo $?
1
```
Changed in juju: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Achilleas Anagnostopoulos (achilleasa) |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
milestone: | none → 2.9-rc6 |
status: | Fix Committed → Fix Released |
PR https:/ /github. com/juju/ juju/pull/ 12684 contains a fix for 2.9