juju fails to find credentials

Bug #1738991 reported by Eric Claude Jones
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Eric Claude Jones

Bug Description

Juju is failing to find credentials and issuing the following debugging output:

https://pastebin.canonical.com/205860/
https://pastebin.canonical.com/205862/

This is related to an existing bug where juju was trying to use a file path as credentials rather than that path's contents:

https://bugs.launchpad.net/juju/+bug/1726226

Yet here the issue is not happening on bootstrap.

Revision history for this message
Eric Claude Jones (ecjones) wrote :

After talking with Anastasia and John, and looking through code a bit, it is quite likely that credentials were loaded from from the environment as a file path and then a `juju update-credential` was run. This would cause the file path and not it's contents to be stored and result in the errors we are seeing in this bug's description. If you reload your credentials by putting the credentials file in `$JUJU_DATA` and then re-run `juju update-credential` you may be able to work around this issue.

Changed in juju:
assignee: nobody → Eric Claude Jones (ecjones)
Revision history for this message
John A Meinel (jameinel) wrote :

We believe that this might already be fixed in current versions of Juju, but that we need a way to help people get off of old versions that were affected by this.
This is mostly opened as a way to track the conversation around this. There may not be anything we can do for this bug specifically, because it is simply an issue of older controllers.

Changed in juju:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Paul Gear (paulgear) wrote :

Updating $JUJU_DATA/credentials.yaml and running juju update-credential is the first thing I tried; I tried with multiple client versions between 2.0.3 and 2.3.1.

Revision history for this message
Paul Gear (paulgear) wrote :

Further debug logs at https://pastebin.canonical.com/205864/ show the same general symptoms.

tags: added: canonical-is gce-provider
Revision history for this message
Eric Claude Jones (ecjones) wrote :
Revision history for this message
Eric Claude Jones (ecjones) wrote :

Hi Paul,

You can build the client @ the above PR, install, and then `juju update-credential`. This should solve your issue.

Changed in juju:
status: Triaged → In Progress
Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Jamon Camisso (jamon) wrote :

I ran update-credentials and still get the errors described here using Juju 2.3.7.

I reported this over in https://bugs.launchpad.net/juju/+bug/1769254 since I didn't see this bug. If it is the same issue, I'll close that one, but I'm not sure it is given I'm running the latest version with the fix committed.

Revision history for this message
Eric Claude Jones (ecjones) wrote :

Hello Jamon,

It's nice to talk to you again. The issue here was that Juju would store the path to the credentials file and not the actual configuration therein. Other portions of Juju would then expect the configuration and would complain that they found "/" (the first character of an absolute path) rather than legitimate YAML. We fixed this by ensuring any credential configuration stored as a path will be "finalized" to its content before use. I will look into this to gather why you still see the problem.

I understand that you have a 2.0.3 controller and a 2.3.7 client and are seeing failures on `upgrade-juju --dry-run`. I will poke at this a bit and let you know if it is the same issue as above or not. Thank you for reporting the error.

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.