Created attachment 686849 [details] packstack answer file Description of problem: I am trying to use packstack with updated Cinder packages, containing changes from bug 887804. Packstack fails with the following errors using those packages: http://pastebin.test.redhat.com/124287 (screen) http://pastebin.test.redhat.com/124288 (log file) I ran the following test: 1. With no cinder packages installed, run packstack, with yum configured to point at a repo containing the updated cinder packages. This fails. 2. Run packstack again with the same answer file. This fails the same way. 3. Add asdf=asdf to the [DEFAULT] section of /etc/cinder/cinder.conf. Run packstack with again with the same answer file -- This succeeds. I think this indicates a problem in packstack/puppet -- it appears that it only fails if no values are present in [DEFAULT]. Version-Release number of selected component (if applicable): openstack-packstack-2012.2.2-0.5.dev318.el6ost.noarch openstack-cinder-2012.2.1-6.el6.noarch.rpm openstack-cinder-doc-2012.2.1-6.el6.noarch.rpm python-cinder-2012.2.1-6.el6.noarch.rpm How reproducible: Repeatedly once problem occurs Additional info:
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