juju openstack-base bundle neutron-*-net-ksv3 sometimes chooses wrong project
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Bundles |
Triaged
|
Medium
|
Andrew McLeod |
Bug Description
After deploying the openstack-base-57 bundle, OpenStack ends up with the following domain/project structure:
$ openstack domain list
+------
| ID | Name | Enabled | Description |
+------
| 0be00c7042f04e2
| 1484134aca4e470
| a18c69b387e3473
+------
$ openstack project list --long
+------
| ID | Name | Domain ID | Description | Enabled |
+------
| 05d117cf95cf449
| 31e074b3ddae4ac
| 4926e92ac0b6457
| 50c45455f6ba4a6
+------
As a result there are two projects called 'admin'. The README for the bundle says to run the two scripts neutron-
Suggest the following fix to identify the correct project_id by matching on project_Id and domain_id within both these scripts:
# Resolve domain id
domain_id = None
for dom in [t._info for t in keystone.
if (dom['name'] == (os.environ[
break # Domain ID found - stop looking
if not domain_id:
# Resolve tenant id
project_id = None
for proj in [t._info for t in keystone.
if (proj['domain_id'] == domain_id and proj['name'] == (opts.project or os.environ[
break # Tenant ID found - stop looking
if not project_id:
sys.exit(1)
Changed in openstack-bundles: | |
assignee: | nobody → Andrew McLeod (admcleod) |
The duplication is an interesting nuance of having to support older clouds which are v2 based, and their upgrade to keystone v3.
Suggested changes to improve scoping of the calls look sensible.