Bug 903719
Summary: | configuration management for Cinder fails | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Eric Harney <eharney> | ||||||||
Component: | openstack-packstack | Assignee: | Derek Higgins <derekh> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Nir Magnezi <nmagnezi> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 2.1 | CC: | aortega, apevec, derekh, mmagr, ykaul | ||||||||
Target Milestone: | snapshot2 | Keywords: | Triaged | ||||||||
Target Release: | 2.1 | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | openstack-packstack-2012.2.2-0.6.dev345.el6ost | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2013-02-14 18:25:16 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: | |||||||||||
Bug Blocks: | 887804, 903545 | ||||||||||
Attachments: |
|
Description
Eric Harney
2013-01-24 16:20:40 UTC
It's not 100% reproducible, running following in a loop: rm -f /var/lib/puppet/state/*yaml cp cinder.conf.sample /etc/cinder/cinder.conf puppet apply --modulepath=/usr/lib/python2.6/site-packages/packstack/puppet/modules cinder-test.pp fails ~70% of the time, tried both in VM and on real HW. To define, failure is when puppet apply returns err like this: err: /Stage[main]/Cinder::Base/Cinder_config[DEFAULT/sql_connection]/ensure: change from absent to present failed: Could not set 'present on ensure: no implicit conversion from nil to integer at /usr/lib/python2.6/site-packages/packstack/puppet/modules/cinder/manifests/base.pp:54 like in Eric's log. BTW, Eric pastebin you used is internal please attach logfile here. Created attachment 686940 [details]
screen output
Created attachment 686941 [details]
packstack log file
The above loop never failed (~130 iterations) with empty cinder.conf i.e. replacing cp cinder.conf.sample /etc/cinder/cinder.conf with cat /dev/null > /etc/cinder/cinder.conf Getting closer, loop fails ~10% with printf "[DEFAULT]\n#sql_connection=somedef\n" > /etc/cinder/cinder.conf i.e. initial cinder.conf with one actual parameter commented out: [DEFAULT] #sql_connection=somedef Hopefully this can be a hint to someone who understands internals of puppetlabs-inifile ? Looks like a problem in the inifile puppet module, it has a default indentation level of nil, which doesn't seem to be getting changed to an int if a value being set has a commented out version and no uncommented version. This seems to fix it. But I got no idea if it breaks something else ... diff --git a/lib/puppet/util/ini_file.rb b/lib/puppet/util/ini_file.rb index 90b0c7b..b654d8c 100644 --- a/lib/puppet/util/ini_file.rb +++ b/lib/puppet/util/ini_file.rb @@ -175,7 +175,7 @@ module Util def read_section(name, start_line, line_iter) settings = {} end_line_num = nil - min_indentation = nil + min_indentation = 0 while true line, line_num = line_iter.peek if (line_num.nil? or match = SECTION_REGEX.match(line)) (In reply to comment #9) > This seems to fix it. Verified, loop in comment 3 never fails with that fix (~100 iterations) Potential fix posted upstream https://review.openstack.org/#/c/20471/ Verified NVR openstack-packstack-2012.2.2-0.8.dev346.el6ost.noarch cinder version: python-cinderclient-0.2.26-1.el6.noarch python-cinder-2012.2.1-7.el6ost.noarch openstack-cinder-2012.2.1-7.el6ost.noarch Marking as verified since cinder works with no errors. Verified the fix: ================= 1. Modified /usr/lib/python2.6/site-packages/packstack/puppet/modules/inifile/lib/puppet/util/ini_file.rb modified the param: min_indentation from 0 to nil 2. ran packstack with an answers file and got the following error: http://pastebin.test.redhat.com/127843 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/RHBA-2013-0260.html |