juju autoload-credentials is stuck

Bug #2032808 reported by Benjamin Allot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Caner Derici

Bug Description

Hello,

I have a new juju2.9.44 client and I wanted to add an openstack cloud.

```
$ juju version
2.9.44-ubuntu-amd64

$ 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
localhost 1 localhost lxd

Clouds available on the client:
Cloud Regions Default Type Credentials Source Description
localhost 1 localhost lxd 1 built-in LXD Container Hypervisor

$ . ~/.canonistack-bos01/ballot.novarc

$ openstack keypair list
+---------------+-------------------------------------------------+------+
| Name | Fingerprint | Type |
+---------------+-------------------------------------------------+------+
| ballot_laptop | 06:bb:3e:77:47:71:a0:cd:35:9a:c1:c1:b0:e5:03:10 | ssh |
+---------------+-------------------------------------------------+------+

$ juju autoload-credentials
This operation can be applied to both a copy on this client and to the one on a controller.
Do you want to add a credential to:
    1. client only (--client)
    2. controller "overmind" only (--controller overmind)
    3. both (--client --controller overmind)
Enter your choice, or type Q|q to quit: 1

Looking for cloud and credential information on local client...
.
.
```

And that is stuck.

After using the debug flag
```
$ juju --debug autoload-credentials
15:36:04 INFO juju.cmd supercommand.go:56 running juju [2.9.44 02d498631e196f2a37f9b7c3b5c31bdcb1dad333 gc go1.20.5]
15:36:04 DEBUG juju.cmd supercommand.go:57 args: []string{"/snap/juju/current/bin/juju", "--debug", "autoload-credentials"} 15:36:04 INFO cmd controller.go:462 This operation can be applied to both a copy on this client and to the one on a controller.
Do you want to add a credential to:
    1. client only (--client)
    2. controller "overmind" only (--controller overmind)
    3. both (--client --controller overmind)
Enter your choice, or type Q|q to quit: 1
15:36:10 INFO cmd detectcredentials.go:163
Looking for cloud and credential information on local client... 15:36:10 DEBUG juju.kubernetes.provider detectcloud.go:33 failed to query local microk8s: microk8s is not installed: microk8s not found
15:36:10 DEBUG juju.provider.azure.internal.azurecli az.go:69 running az account list -o json
15:36:10 DEBUG juju.provider.azure.internal.azurecli az.go:78 az returned: &[]azurecli.Account{
.
.
```

So because I have an azurecli configured for something, this is causing an issue for an unrelated cloud addition.

I'm not sure it's intended.

Revision history for this message
Joseph Phillips (manadart) wrote :

I think the thing to do is use a context to time-box the attempt for each potential credential.
Report those that failed, then action the detected ones as normal.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Changed in juju:
assignee: nobody → Joseph Phillips (manadart)
assignee: Joseph Phillips (manadart) → Caner Derici (cderici)
milestone: none → 3.1.6
milestone: 3.1.6 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.