Bug 1236229

Summary: Incorrect keystonerc_demo file for keystone v2 and CONFIG_PROVISION_DEMO=y
Product: Red Hat OpenStack Reporter: Luigi Toscano <ltoscano>
Component: openstack-packstackAssignee: Ivan Chavero <ichavero>
Status: CLOSED ERRATA QA Contact: Rodrigo Duarte <rduartes>
Severity: high Docs Contact:
Priority: medium    
Version: 7.0 (Kilo)CC: aortega, dnavale, gchamoul, ichavero, mmagr, mpayantc, nlevinki, racedoro, sclewis, yeylon
Target Milestone: z4Keywords: Triaged, ZStream
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2015.1-0.15.dev1589.g1d6372f.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 16:46:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luigi Toscano 2015-06-26 23:55:50 UTC
Description of problem:
When CONFIG_PROVISION_DEMO=y (and most likely when CONFIG_KEYSTONE_API_VERSION=v2.0, see below ), the generated keystonerc_demo returns an error when it is sourced:

bash: keystonerc_demo: line 8: unexpected EOF while looking for matching `''
bash: keystonerc_demo: line 9: syntax error: unexpected end of file

as it contains an invalid reference to hiera:
------------------
unset OS_SERVICE_TOKEN
export OS_USERNAME=demo
export OS_PASSWORD=demo
export PS1='[\u@\h \W(keystone_demo)]\$
export OS_AUTH_URL=http://<IP>:5000/v2.0

export OS_TENANT_NAME=demo
export OS_IDENTITY_API_VERSION=hiera('CONFIG_KEYSTONE_API_VERSION')
------------------

keystonerc_admin is correct (the content is slightly different).

I suspect the issue is a simple missing replacement during the changes in the  commit titled "Make keystonrc file compatible with keystone v3 API":

https://github.com/stackforge/packstack/commit/ba12a8cb5103db498dd7278c9fd57a5e4852df4c

Line 66 of the new version, it should be
s/hiera('CONFIG_KEYSTONE_API_VERSION')/${int_api_version}/

Version-Release number of selected component (if applicable):
openstack-packstack-2015.1-0.6.dev1577.gc9f8c3c.el7ost.noarch

Comment 2 Ivan Chavero 2015-10-29 07:32:43 UTC
can i have acks for this bug please?

Comment 3 Alvaro Lopez Ortega 2015-12-03 15:48:39 UTC
High prio with a patch. Needs packaging. Reassigning to Ivan.

Comment 6 Rodrigo Duarte 2016-01-28 11:17:52 UTC
Verified for build "packstack Liberty 7.0.0.dev1661.gaf13b7e".

Setup with a VM with OpenStack installed via Packstack - the provision demo flag must be enabled.

Then we test if the "keystonerc_demo" can be sourced and the env vars are exported by executing a simple openstack command:

# source /root/keystonerc_demo
# openstack image list

+--------------------------------------+--------+
| ID                                   | Name   |
+--------------------------------------+--------+
| eb569f16-0dc3-4064-84e2-8c445de068a1 | cirros |
+--------------------------------------+--------+

Comment 9 errata-xmlrpc 2016-02-18 16:46:12 UTC
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://rhn.redhat.com/errata/RHBA-2016-0265.html

Comment 10 Red Hat Bugzilla 2023-09-18 00:11:35 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days