Juju and autoload-credentials should be able to use OS_PROJECT_ID for OpenStack provider

Bug #1722551 reported by Nobuto Murata
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Eric Claude Jones

Bug Description

OpenStack Horizon generates openrc.sh with Keystone v3 credentials using the following template:
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/api_access/templates/api_access/openrc.sh.template

It basically exports 9 variables below:

OS_PROJECT_ID
OS_REGION_NAME
OS_USER_DOMAIN_NAME
OS_PROJECT_NAME
OS_IDENTITY_API_VERSION
OS_PASSWORD
OS_AUTH_URL
OS_USERNAME
OS_INTERFACE

With using those environment variables, `juju autoload-credentials` generates ~/.local/share/juju/credentials.yaml as follows:

credentials:
  openstack-test:
    default-region: my_region
    my_username:
      auth-type: userpass
      domain-name: ""
      password: my_password
      project-domain-name: ""
      tenant-name: 'my_project'
      user-domain-name: my_domain
      username: my_username

If the openrc.sh contains OS_PROJECT_DOMAIN_NAME, it works. But unfortunately the Horizon openrc.sh template does not have it, Juju needs to adapt to use OS_PROJECT_ID because that's the only way to specify a project identically.

Revision history for this message
Nobuto Murata (nobuto) wrote :

A workaround is to specify the same domain with user-domain-name to project-domain-name by hand.

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.3.0
importance: Undecided → High
status: New → Triaged
tags: added: papercut usability
Ian Booth (wallyworld)
Changed in juju:
assignee: nobody → Eric Claude Jones (ecjones)
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Eric Claude Jones (ecjones) wrote :
Changed in juju:
status: In Progress → Fix Committed
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

go-goose changed pulled into juju via: https://github.com/juju/juju/pull/7973

Tim Penhey (thumper)
Changed in juju:
milestone: 2.3.0 → 2.3-beta3
Changed in juju:
status: Fix Committed → Fix Released
Revision history for this message
Nobuto Murata (nobuto) wrote :

I'm using 2.3.2-xenial-amd64, but ~/.local/share/juju/credentials.yaml still does not contain project id when I use openrc.sh. Can you please reopen this?

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.