Bug 965704

Summary: packstack fails for not recognizing existing /var/lib/cinder/cinder-volumes
Product: Red Hat OpenStack Reporter: Daniel Paikov <dpaikov>
Component: openstack-packstackAssignee: Martin Magr <mmagr>
Status: CLOSED WORKSFORME QA Contact: Nir Magnezi <nmagnezi>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: aortega, derekh, dpaikov, hateya, mmagr, ykaul
Target Milestone: rc   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-05 08:36:50 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:
Attachments:
Description Flags
openstack-setup.log none

Description Daniel Paikov 2013-05-21 15:14:33 UTC
Created attachment 751221 [details]
openstack-setup.log

packstack doesn't always reocgnize existing /var/lib/cinder/cinder-volumes. Installation fails like this:

+ trap t ERR
+ vgdisplay cinder-volumes
  Volume group "cinder-volumes" not found
++ t
++ exit 5

2013-05-21 17:16:58::INFO::cinder_250::169::root:: A new cinder volumes group will be created
2013-05-21 17:16:58::ERROR::common_utils::412::root:: ============= STDERR ==========
2013-05-21 17:16:58::ERROR::common_utils::413::root:: Warning: Permanently added '10.35.104.17' (RSA) to the list of known hosts.
+ trap t ERR
+ mkdir -p /var/lib/cinder
+ dd if=/dev/zero of=/var/lib/cinder/cinder-volumes bs=1 count=0 seek=20G
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2.6302e-05 s, 0.0 kB/s
++ losetup --show -f /var/lib/cinder/cinder-volumes
+ LOFI=/dev/loop0
+ pvcreate /dev/loop0
  Can't initialize physical volume "/dev/loop0" of volume group "cinder-volumes" without -ff
++ t
++ exit 5

2013-05-21 17:16:59::ERROR::run_setup::906::root:: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 886, in main
    single_step_aio_install(options)
  File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 678, in single_step_aio_install
    single_step_install(options)
  File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 708, in single_step_install
    _main(answerfilepath)
  File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 597, in _main
    runSequences()
  File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 574, in runSequences
    controller.runAllSequences()
  File "/usr/lib/python2.6/site-packages/packstack/installer/setup_controller.py", line 77, in runAllSequences
    sequence.run()
  File "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", line 153, in run
    step.run()
  File "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", line 60, in run
    function()
  File "/usr/lib/python2.6/site-packages/packstack/plugins/cinder_250.py", line 203, in check_cinder_vg
    raise exceptions.MissingRequirements(err)
MissingRequirements: Cinder's volume group 'cinder-volumes' could not be created

Comment 2 Daniel Paikov 2013-05-27 08:56:26 UTC
Additional info:

The file exists, but it is not a VG and is not assigned to a loop device. For example:

[root@orange-vdsf ~]# vgdisplay cinder-volumes
  Volume group "cinder-volumes" not found
[root@orange-vdsf ~]# losetup -a
[root@orange-vdsf ~]# ls -l /var/lib/cinder/cinder-volumes 
-rw-r--r--. 1 root root 21474836480 May 27 11:53 /var/lib/cinder/cinder-volumes

Comment 3 Martin Magr 2013-06-03 13:09:12 UTC
So this happened when you run Packstack the second time? What was your cinder configuration?

Comment 4 Daniel Paikov 2013-06-03 13:17:51 UTC
(In reply to Martin Magr from comment #3)
> So this happened when you run Packstack the second time? What was your
> cinder configuration?

Both runs of packstack were with --allinone.

Comment 5 Martin Magr 2013-06-03 15:08:35 UTC
--allinone regenerates all setting values (including passwords which are not refreshed in some config files ... will be fixed in new build) every time it is run. For the second time you should use answer file which is created for you in home directory.

Please try to run packstack with --answer-file=~/packstack-answers-<oldest timestamp>.txt and report if it succeeded. I'm unable to reproduce described behaviour.

Comment 6 Daniel Paikov 2013-06-05 07:06:28 UTC
(In reply to Martin Magr from comment #5)
> --allinone regenerates all setting values (including passwords which are not
> refreshed in some config files ... will be fixed in new build) every time it
> is run. For the second time you should use answer file which is created for
> you in home directory.
> 
> Please try to run packstack with --answer-file=~/packstack-answers-<oldest
> timestamp>.txt and report if it succeeded. I'm unable to reproduce described
> behaviour.

Unable to reproduce with --answer-file, I guess it only reproduces with --allinone.

Comment 7 Martin Magr 2013-06-05 08:36:50 UTC
Ok, will close this bug. If you will encounter the problem again, please reopen this bug or create new one.