rhosp-director: [RFE] - to add "export OS_PROJECT_NAME=admin" line to the generated stackrc file Here's what the stackrc looks now: NOVA_VERSION=1.1 export NOVA_VERSION OS_PASSWORD=$(sudo hiera admin_password) export OS_PASSWORD OS_AUTH_URL=http://192.168.24.1:5000/v2.0 export OS_AUTH_URL OS_USERNAME=admin OS_TENANT_NAME=admin COMPUTE_API_VERSION=1.1 OS_BAREMETAL_API_VERSION=1.15 OS_NO_CACHE=True OS_CLOUDNAME=undercloud export OS_USERNAME export OS_TENANT_NAME export COMPUTE_API_VERSION export OS_BAREMETAL_API_VERSION export OS_NO_CACHE export OS_CLOUDNAME [stack@undercloud-0 ~]$ . stackrc [stack@undercloud-0 ~]$ nova list +--------------------------------------+--------------+--------+------------+-------------+------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+--------------+--------+------------+-------------+------------------------+ | a08cd3f5-22ba-4d5b-b331-ede4e56b6081 | ceph-0 | ACTIVE | - | Running | ctlplane=192.168.24.18 | | ee66176f-ac95-44f4-9c30-68dada32888d | ceph-1 | ACTIVE | - | Running | ctlplane=192.168.24.8 | | 15762f57-57f4-4a09-87bf-9e633f1bbe5e | compute-0 | ACTIVE | - | Running | ctlplane=192.168.24.10 | | e8ea1150-86be-4cb5-93a9-021cee7fcf79 | compute-1 | ACTIVE | - | Running | ctlplane=192.168.24.7 | | 9df99e67-70ae-4a6d-bed0-be594f9fe8b7 | controller-0 | ACTIVE | - | Running | ctlplane=192.168.24.9 | | 72f97993-048a-49d9-b056-f4570a7d2c93 | controller-1 | ACTIVE | - | Running | ctlplane=192.168.24.16 | | b51b633a-6719-49f6-9c9e-88ba016f6b36 | controller-2 | ACTIVE | - | Running | ctlplane=192.168.24.19 | +--------------------------------------+--------------+--------+------------+-------------+------------------------+ [stack@undercloud-0 ~]$ export OS_PROJECT_NAME=admin1 [stack@undercloud-0 ~]$ nova list ERROR (Unauthorized): The request you have made requires authentication. (HTTP 401) (Request-ID: req-f2290e46-d2c1-4f19-bd15-57d58076feae) [stack@undercloud-0 ~]$ export OS_PROJECT_NAME=admin [stack@undercloud-0 ~]$ nova list +--------------------------------------+--------------+--------+------------+-------------+------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+--------------+--------+------------+-------------+------------------------+ | a08cd3f5-22ba-4d5b-b331-ede4e56b6081 | ceph-0 | ACTIVE | - | Running | ctlplane=192.168.24.18 | | ee66176f-ac95-44f4-9c30-68dada32888d | ceph-1 | ACTIVE | - | Running | ctlplane=192.168.24.8 | | 15762f57-57f4-4a09-87bf-9e633f1bbe5e | compute-0 | ACTIVE | - | Running | ctlplane=192.168.24.10 | | e8ea1150-86be-4cb5-93a9-021cee7fcf79 | compute-1 | ACTIVE | - | Running | ctlplane=192.168.24.7 | | 9df99e67-70ae-4a6d-bed0-be594f9fe8b7 | controller-0 | ACTIVE | - | Running | ctlplane=192.168.24.9 | | 72f97993-048a-49d9-b056-f4570a7d2c93 | controller-1 | ACTIVE | - | Running | ctlplane=192.168.24.16 | | b51b633a-6719-49f6-9c9e-88ba016f6b36 | controller-2 | ACTIVE | - | Running | ctlplane=192.168.24.19 | +--------------------------------------+--------------+--------+------------+-------------+------------------------+
before running commands on undercloud, we source the stackrc and expect things to work and apparently it relies on having OS_PROJECT_NAME set to admin I created another user/pass/project and tried to operate on overcloud then, when I wanted to switch back to working on undercloud - I got: ERROR (Unauthorized): The request you have made requires authentication. (HTTP 401) (Request-ID: req-7804f2bc-9207-4c98-88ff-e2d8cf95ad46)
We can add project name, although since we don't generate a v3 stackrc I'm not sure whether that's the best approach. I think the short-term solution is to add something like https://github.com/openstack/tripleo-common/blob/8affc8aafecc74c49af6593e4ec9ce1723845925/tripleo_common/utils/overcloudrc.py#L62 to stackrc so we don't end up with remnants of a previous rc file in the current env.
Ben, sounds good, Thanks.
I'm pretty sure Angus has no specific interest in this bug. :-)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1245