Unable to use updated openstack credentials

Bug #2008449 reported by James Simpson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

Juju version: 2.9.32
Cloud: Openstack

I'm hitting an issue with authentication after updating an openstack user credential.
These are the (redacted) credentials in use:

  ```
  juju show-credentials --controller prodstack-is-beta prodstack5 stg-jsimpso-test --show-secrets
  controller-credentials:
    prodstack5:
      stg-jsimpso-test:
        content:
          auth-type: userpass
          validity-check: valid
          domain-name: ""
          password: <redacted>
          project-domain-name: Default
          tenant-id: stg-jsimpso-test_project
          tenant-name: stg-jsimpso-test_project
          user-domain-name: Default
          username: stg-jsimpso-test
          version: "3"
        models:
          stg-jsimpso-test: admin
  ```

That's the only credential present for that model:

  ```
  juju show-model stg-jsimpso-test | yq eval '.stg-jsimpso-test.credential'
  name: stg-jsimpso-test
  owner: admin
  cloud: prodstack5
  validity-check: valid
  ```

In that state, the model is able to deploy machines with no problem.
If I then update the openstack user's password (e.g.):

  `openstack user set --password example1 stg-jsimpso-test --domain default`

Unsurprisingly, the model is unable to deploy a new application:

  ```
  juju deploy ubuntu
  Located charm "ubuntu" in charm-hub, revision 21
  Deploying "ubuntu" from charm-hub charm "ubuntu", revision 21 in channel stable on focal
  ERROR cannot add application "ubuntu": failed to get list of flavour details
  caused by: authentication failed
  caused by: requesting token: Unauthorised URL https://<keystone_url>:5000/v3/auth/tokens
  caused by: request (https://<keystone_url>:5000/v3/auth/tokens) returned unexpected status: 401; error info: Failed: 401 error: The request you have made requires authentication.
  ```

This also happens when I try to "juju show-model":

  ```
  stg-jsimpso-test@is-bastion-ps5:~$ juju show-model
  {}
  ERROR accessing model environment: creating environ for model "stg-jsimpso-test" (f448c790-d617-407e-86f4-1b3808e3d803): authentication failed.: authentication failed
  caused by: requesting token: Unauthorised URL https://<keystone_url>:5000/v3/auth/tokens
  caused by: request (https://<keystone_url>:5000/v3/auth/tokens) returned unexpected status: 401; error info: Failed: 401 error: The request you have made requires authentication.
  ```

So I update the credentials and verify nothing has changed except the password:

  ```
  juju update-credential --controller prodstack-is-beta prodstack5 stg-jsimpso-test -f mine.yaml
  juju show-credentials --controller prodstack-is-beta prodstack5 stg-jsimpso-test --show-secrets
  controller-credentials:
    prodstack5:
      stg-jsimpso-test:
        content:
          auth-type: userpass
          validity-check: valid
          domain-name: ""
          password: example1
          project-domain-name: Default
          tenant-id: stg-jsimpso-test_project
          tenant-name: stg-jsimpso-test_project
          user-domain-name: Default
          username: stg-jsimpso-test
          version: "3"
        models:
          stg-jsimpso-test: admin
  ```

After that, I can "juju show-model" as expected:

  ```
  stg-jsimpso-test@is-bastion-ps5:~$ juju show-model
  stg-jsimpso-test:
    name: admin/stg-jsimpso-test
    short-name: stg-jsimpso-test
  ```

But I can't deploy new applications:

  ```
  stg-jsimpso-test@is-bastion-ps5:~$ juju deploy ubuntu
  Located charm "ubuntu" in charm-hub, revision 21
  Deploying "ubuntu" from charm-hub charm "ubuntu", revision 21 in channel stable on focal
  ERROR cannot add application "ubuntu": failed to get list of flavour details
  caused by: authentication failed
  caused by: requesting token: Unauthorised URL https://<keystone_url>:5000/v3/auth/tokens
  caused by: request (https://<keystone_url>:5000/v3/auth/tokens) returned unexpected status: 401; error info: Failed: 401 error: The request you have made requires authentication.
  ```
The credentials themselves work fine in other regards:

  ```
  echo $OS_PASSWORD
  example1

  openstack flavor list -c Name | head -n 4
  +-------------------------+
  | Name |
  +-------------------------+
  | stag-cpu4-ram4-disk100 |

  ```

It's also worth noting that if I reset the openstack password back to what it was originally & update the juju credentials accordingly, everything starts to work again.

Tom Haddon (mthaddon)
tags: added: canonnical-is
tags: added: canonical-is
removed: canonnical-is
Changed in juju:
importance: Undecided → High
milestone: none → 2.9.43
status: New → Triaged
tags: added: credentials openstack-provider
Changed in juju:
milestone: 2.9.43 → 2.9.44
Changed in juju:
milestone: 2.9.44 → 2.9.45
Changed in juju:
milestone: 2.9.45 → 2.9.46
Revision history for this message
Ian Booth (wallyworld) wrote :

The next 2.9.46 candidate release will not include a fix for this bug and we don't plan on any more 2.9 releases. As such it is being removed from its 2.9 milestone.

If the bug is still important to you, let us know and we can consider it for inclusion on a 3.x milestone.

Changed in juju:
milestone: 2.9.46 → 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.