Bug 1022686 - Keystone puppet modules fail to parse output of keystone command
Summary: Keystone puppet modules fail to parse output of keystone command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-puppet-modules
Version: 4.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: beta
: 4.0
Assignee: Martin Magr
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On: 1022421
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-23 19:18 UTC by Lars Kellogg-Stedman
Modified: 2013-12-20 00:32 UTC (History)
9 users (show)

Fixed In Version: openstack-packstack-2013.2.1-0.11.dev847.el6ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-20 00:32:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 53661 0 None None None Never
OpenStack gerrit 55424 0 None None None Never
Red Hat Product Errata RHEA-2013:1859 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2013-12-21 00:01:48 UTC

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


Note You need to log in before you can comment on or make changes to this bug.