Bug 971145 - rc.local losetup not sufficient to bring LVs online
rc.local losetup not sufficient to bring LVs online
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-packstack (Show other bugs)
3.0
Unspecified Unspecified
high Severity high
: snapshot2
: 3.0
Assigned To: Martin Magr
Giulio Fidente
:
Depends On:
Blocks: 953637 980967
  Show dependency treegraph
 
Reported: 2013-06-05 15:31 EDT by Eric Harney
Modified: 2016-04-26 13:13 EDT (History)
9 users (show)

See Also:
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 14:53:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 31958 None None None Never
OpenStack gerrit 32387 None None None Never

  None (edit)
Description Eric Harney 2013-06-05 15:31:12 EDT
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 07:07:33 EDT
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 08:41:50 EDT
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 11:30:57 EDT
verified using openstack-packstack-2013.1.1-0.15.dev625
Comment 6 errata-xmlrpc 2013-06-11 14:53:45 EDT
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

Note You need to log in before you can comment on or make changes to this bug.