juju list-credentials fails to display

Bug #1564157 reported by Nicholas Skaggs
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth
juju-core (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When a cloud is not found in your credentials file, the credentials are not listed. In addition, the credentials error given is confusing, and non-consistent.

nskaggs@pixel:~$ juju list-credentials
ERROR removing secrets from credentials for cloud maas18: cloud maas18 not found
nskaggs@pixel:~$ juju list-credentials
ERROR removing secrets from credentials for cloud munna-vmaas: cloud munna-vmaas not found
nskaggs@pixel:~$ juju list-credentials
ERROR removing secrets from credentials for cloud silcoon-vmaas: cloud silcoon-vmaas not found
nskaggs@pixel:~$ juju list-credentials
ERROR removing secrets from credentials for cloud jujuqa-stack: cloud jujuqa-stack not found
nskaggs@pixel:~$ juju list-credentials
ERROR removing secrets from credentials for cloud maas19: cloud maas19 not found
nskaggs@pixel:~$ juju list-credentials
ERROR removing secrets from credentials for cloud silcoon-vmaas: cloud silcoon-vmaas not found
nskaggs@pixel:~$ juju list-credentials
ERROR removing secrets from credentials for cloud silcoon-vmaas: cloud silcoon-vmaas not found

Juju should still list all credentials in the file, as well as displaying a friendly warning about any clouds it cannot find.

Tags: ateam uosci
Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
affects: juju-core → juju
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in juju-core (Ubuntu):
status: New → Confirmed
Revision history for this message
Ryan Beisner (1chb1n) wrote :

I am hitting this for 2.0b18. After removing a cloud, list-credentials bails in a weird way.

ubuntu@loudred-ppc64:~/juju⟫ juju list-credentials
ERROR removing secrets from credentials for cloud ppc64stack: cloud ppc64stack not valid

130 ubuntu@loudred-ppc64:~/juju⟫ juju version
2.0-beta18-xenial-ppc64el

tags: added: uosci
Revision history for this message
Ryan Beisner (1chb1n) wrote :

I attempted to work around this by re-adding a new cloud of the same name as the cloud that was previously deleted. Juju then succeeded to list-credential and I was able to remove-credential. But, with an empty output of list-credential, and after doing remove-cloud, list-credential failed in the same way.

Revision history for this message
Ryan Beisner (1chb1n) wrote :

ubuntu@loudred-ppc64:~/juju⟫ juju list-credentials
CLOUD CREDENTIALS
ppc64stack

ubuntu@loudred-ppc64:~/juju⟫ juju remove-cloud ppc64stack
Removed details of personal cloud "ppc64stack"

ubuntu@loudred-ppc64:~/juju⟫ juju list-credentials
ERROR removing secrets from credentials for cloud ppc64stack: cloud ppc64stack not valid

Revision history for this message
Ryan Beisner (1chb1n) wrote :

To simplify a bit: Strictly with the CLI, I added a cloud. Added a cred. Used the cloud. Deleted the cred. Deleted the cloud. And then no bueno with list-credentials.

This is what the on-disk credentials.yaml looked like after that. Removing that worked around the issue, but that is an issue for automation which aims to use the CLI.

ubuntu@loudred-ppc64:~⟫ cat .local/share/juju/credentials.yaml
credentials:
  ppc64stack: {}

ubuntu@loudred-ppc64:~⟫ rm .local/share/juju/credentials.yaml

ubuntu@loudred-ppc64:~⟫ juju list-credentials
CLOUD CREDENTIALS

Changed in juju:
importance: Medium → High
milestone: none → 2.0.0
Changed in juju:
assignee: nobody → Alexis Bruemmer (alexis-bruemmer)
tags: added: ateam
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0-rc3 → 2.0.0
Ian Booth (wallyworld)
Changed in juju:
assignee: Alexis Bruemmer (alexis-bruemmer) → Ian Booth (wallyworld)
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
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.