Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 971145

Summary: rc.local losetup not sufficient to bring LVs online
Product: Red Hat OpenStack Reporter: Eric Harney <eharney>
Component: openstack-packstackAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: Giulio Fidente <gfidente>
Severity: high Docs Contact:
Priority: high    
Version: 3.0CC: aortega, beagles, bperkins, derekh, mmagr, sclewis, sgordon, ykaul
Target Milestone: snapshot2   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2013.1.1-0.15.dev625 Doc Type: Bug Fix
Doc Text:
When configuring the rc.local initialization script to mount volume storage during boot PackStack assumed that the loop device in use was always /dev/loop0. As a result if /dev/loop0 was already taken then mount would fail. PackStack has been updated to use the next available loop device instead of assuming /dev/loop0 is always available.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 18:53:45 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: 953637, 980967    

Description Eric Harney 2013-06-05 19:31:12 UTC
Description of problem:
Packstack puts an "losetup /dev/loop0 /var/lib/cinder/cinder-volumes" in /etc/rc.d/rc.local.  I don't think this is sufficient to fully bring up the LVM stack.

Version-Release number of selected component (if applicable):
openstack-packstack-2013.1.1-0.7.dev580.el6ost.noarch

Steps to Reproduce:
1.  New RHOS 3 installation
2.  Create a Cinder LVM-backed volume
2b. Look at tgt-admin -s
3.  Reboot
4.  Look at tgt-admin -s
5.  Look at lvs

Actual results:
tgt-admin: Target exists but LUN is missing.  I think this is because the LV devices do not exist.
lvs: LV for Cinder volume is not online

Additional info:
rc.local should also do a "vgchange -a y cinder-volumes" to bring all LVs in that group online.

A "vgscan" or "pvscan" may also be needed after doing losetup to always find the VG but I am not sure.

Comment 2 Nir Magnezi 2013-06-10 11:07:33 UTC
Reassigning.
Tested NVR: openstack-packstack-2013.1.1-0.13.dev621.el6ost.noarch

1. Install openstack via packstack
2. Create a Cinder LVM-backed volume
3. Check if LV is online
# lvs
  LV                                          VG             Attr      LSize   
  volume-0ae79cda-f7fa-4eed-b536-aa33c449dd70 cinder-volumes -wi-ao---   2.00g       
# tgt-admin -s
Target 1: iqn.2010-10.org.openstack:volume-0ae79cda-f7fa-4eed-b536-aa33c449dd70
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 2147 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /dev/cinder-volumes/volume-0ae79cda-f7fa-4eed-b536-aa33c449dd70
            Backing store flags: 
    Account information:
    ACL information:
        ALL            
4. Reboot the server
5. Check if LV is online
# lvs
  LV      VG   Attr      LSize   Pool Origin Data%  Move Log Cpy%Sync Convert
  lv_root vg0  -wi-ao--- 449.82g                                             
  lv_swap vg0  -wi-ao---  15.74g                                             
# tgt-admin -s
Target 1: iqn.2010-10.org.openstack:volume-0ae79cda-f7fa-4eed-b536-aa33c449dd70
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
    Account information:
    ACL information:
        ALL

Looks like the LV is offline / absent post reboot.

Comment 3 Martin Magr 2013-06-10 12:41:50 UTC
From your machine it seems that in some cases /dev/loop0 is busy before it is losetup-ed to serve for VG. Manual setup to /dev/loop1 fixed the issue, so I will implement it also in rc.local file.

Comment 5 Giulio Fidente 2013-06-11 15:30:57 UTC
verified using openstack-packstack-2013.1.1-0.15.dev625

Comment 6 errata-xmlrpc 2013-06-11 18:53:45 UTC
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-0938.html