Red Hat Bugzilla – Bug 1022686
Keystone puppet modules fail to parse output of keystone command
Last modified: 2013-12-19 19:32:06 EST
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):
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.
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:
> 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!
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.
verified in latest puddle from Nov 18.
# rpm -qa |grep openstack-packstack
no errors during packstack install
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.