This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1022686 - Keystone puppet modules fail to parse output of keystone command
Keystone puppet modules fail to parse output of keystone command
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-puppet-modules (Show other bugs)
4.0
Unspecified Unspecified
unspecified Severity high
: beta
: 4.0
Assigned To: Martin Magr
Ami Jeain
: Regression, TestBlocker
Depends On: 1022421
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-23 15:18 EDT by Lars Kellogg-Stedman
Modified: 2013-12-19 19:32 EST (History)
9 users (show)

See Also:
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-19 19:32:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 53661 None None None Never
OpenStack gerrit 55424 None None None Never

  None (edit)
Description Lars Kellogg-Stedman 2013-10-23 15:18:24 EDT
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 16:40:51 EDT
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 12:41:03 EDT
> 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 10:08:04 EST
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 17:11:35 EST
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-19 19:32:06 EST
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.