Bug 971145 - rc.local losetup not sufficient to bring LVs online
Summary: rc.local losetup not sufficient to bring LVs online
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-packstack
Version: 3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: snapshot2
: 3.0
Assignee: Martin Magr
QA Contact: Giulio Fidente
URL:
Whiteboard:
Depends On:
Blocks: 953637 980967
TreeView+ depends on / blocked
 
Reported: 2013-06-05 19:31 UTC by Eric Harney
Modified: 2019-09-10 14:12 UTC (History)
8 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-06-11 18:53:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 31958 0 None None None Never
OpenStack gerrit 32387 0 None None None Never
Red Hat Product Errata RHBA-2013:0938 0 normal SHIPPED_LIVE openstack-packstack bug fix advisory 2013-06-11 22:48:19 UTC

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


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