juju credentials stuck as invalid for vsphere cloud
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Caner Derici |
Bug Description
when dealing with a vsphere cloud, we have credentials loaded into juju under a vsphere cloud.
Adding machines work one day, but sometime(not sure whats the period of time here) later, they get marked as invalid in juju possibly due something from what the vsphere endpoint replies?
```
$ juju show-credential
controller-
vsphere:
vsphere:
content:
auth-type: userpass
user: <REDACTED>
vmfolder: <REDACTED>
models:
controller: admin
default: admin
<REDACTED>: admin
<REDACTED>: admin
client-credentials:
vsphere:
vsphere:
content:
auth-type: userpass
user: <REDACTED>
vmfolder: K8S-PRD_VMs
```
notice, this line
```
validity-check: invalid
```
juju add-machine silently fails and enabling DEBUG via model-config logging-config for the module `juju.worker.
juju_engine_report mentions that
```
- api-caller
- is-responsible-flag
- valid-credentia
```
And when I get into mongo, I can see
```
juju:PRIMARY> db.cloudCredent
{
"_id" : "vsphere#
"owner" : "admin",
"cloud" : "vsphere",
"name" : "vsphere",
"revoked" : false,
"auth-type" : "userpass",
},
"invalid" : true,
"txn-revno" : NumberLong(25),
"txn-queue" : [ ],
}
```
This invalid reason, never gets mentioned anywhere in any logs or credential related commands.
NOTE: that the credentials are actually valid (as tested with govc cli and using vsphere UI).
Some Troubleshooting:
- Tried to `juju update-credential vsphere vsphere` but that does not help
- Restarted all juju controller agents after the credential update but that does not help.
- Update creds again after juju controller was bounced still did not help.
Even after these steps above, the credential still shows up as invalid.
Workaround:
Stop the juju controllers (here, with `systemctl stop jujud-machine-
```
db.cloudCredent
db.cloudCredent
```
after doing so, juju add-machine works perfectly fine.
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Medium |
description: | updated |
Changed in juju: | |
milestone: | 3.1.8 → 3.3.3 |
Changed in juju: | |
milestone: | 3.3.3 → 3.3.4 |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
status: | Fix Committed → Fix Released |
also, this is with juju 2.9.44