Bug 1022686

Summary: Keystone puppet modules fail to parse output of keystone command
Product: Red Hat OpenStack Reporter: Lars Kellogg-Stedman <lars>
Component: openstack-puppet-modulesAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: Ami Jeain <ajeain>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0CC: ajeain, aortega, apevec, ddomingo, derekh, hateya, mmagr, pbrady, yeylon
Target Milestone: betaKeywords: Regression, TestBlocker
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2013.2.1-0.11.dev847.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-20 00:32:06 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:
Bug Depends On: 1022421    
Bug Blocks:    

Description Lars Kellogg-Stedman 2013-10-23 19:18:24 UTC
Description of problem:

Running `packstack` on RHOS 4 results in errors along the lines of:

Error: /Stage[main]/Keystone::Roles::Admin/Keystone_role[_member_]: Could not evaluate: Expected 2 columns for role row, found 0. Line +----------------------------------+----------+

This prevents the keystone manifest from applying halts the installation process.

Version-Release number of selected component (if applicable):

2013.2.1-0.7.dev806.el6ost

Additional info:

The keystone command on RHOS 4 generates the following warning on stderr:

/usr/lib/python2.6/site-packages/babel/__init__.py:33: UserWarning: Module backports was already imported from /usr/lib64/python2.6/site-packages/backports/__init__.pyc, but /usr/lib/python2.6/site-packages is being added to sys.path
  from pkg_resources import get_distribution, ResolutionError

This appears to cause a problem in the "keystone.rb" Puppet provider, which:

(a) Consumes both stderr and stdout from the keystone command and
(b) Relies on line offsets to find the necessary output

The additional error messages throw off the line offsets.  This could be fixed by simply discarding stderr.  I've look at keystone.rb, and a likely location for a quick fix is the "remote_warnings" function, which could be modified to strip out these additional warnings, but I'm not 100% certain that every invocation of keystone is processed through this function.

Fixing keystone to not produce the UserWarning would also prevent the problem.

Comment 2 Pádraig Brady 2013-10-23 20:40:51 UTC
The puppet modules triggering this issue were included with a packstack
release that coincided with the Havana release.
So to facilitate a quick Havana release I added an updated python-backports
to the RDO repos to avoid the warning and thus the puppet error.

We probably should not do that for RHOS and just fix the puppet keystone regression, but as a workaround you could probably install:
http://repos.fedorapeople.org/repos/openstack/openstack-havana/epel-6/python-backports-1.0-4.el6.x86_64.rpm

Comment 3 Alan Pevec 2013-10-29 16:41:03 UTC
> So to facilitate a quick Havana release I added an updated python-backports
> to the RDO repos to avoid the warning and thus the puppet error.

NB: this is a valid workaround for RDO only, in RHOS there isn't separate python-backports package!

Comment 4 Martin Magr 2013-11-06 15:08:04 UTC
Upstream seems not to care about submitted quickfix. So I forked puppet-keystone until the issue will be fixed differently or the quickfix will be merged.

Comment 6 Ami Jeain 2013-11-19 22:11:35 UTC
verified in latest puddle from Nov 18.
# rpm -qa |grep openstack-packstack
openstack-packstack-2013.2.1-0.11.dev847.el6ost.noarch

no errors during packstack install

Comment 9 errata-xmlrpc 2013-12-20 00:32:06 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.

http://rhn.redhat.com/errata/RHEA-2013-1859.html