rootwrap.d ln doesn't work for non iSCSI volumes

Bug #1441903 reported by Walt Boring
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned

Bug Description

The compute.filters line for ln doesn't allow for anything other than iSCSI volumes.

It should allow for FC based volumes as well.

# nova/virt/libvirt/volume.py:
sginfo: CommandFilter, sginfo, root
sg_scan: CommandFilter, sg_scan, root
ln: RegExpFilter, ln, root, ln, --symbolic, --force, /dev/mapper/ip-.*-iscsi-iqn.*, /dev/disk/by-path/ip-.*-iscsi-iqn.*

lvmxh (shaohef)
Changed in nova:
assignee: nobody → lvmxh (shaohef)
Eli Qiao (taget-9)
Changed in nova:
status: New → Incomplete
Revision history for this message
lvmxh (shaohef) wrote :

hi Walt Boring:

can you help to list the name of FC volume in /dev/mapper and /dev/disk ?

Revision history for this message
wanghao (wanghao749) wrote :

hi shaohef: Maybe you can send this message to IRC channel of cinder. It will be more helpful. :)

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

@Walt Boring:

Is this bug report still valid? I don't quit get the faulty behavior you described there.

Revision history for this message
Walt Boring (walter-boring) wrote :

The format for FC based volumes showing up in /dev/disk/by-path is as follows.

https://github.com/openstack/os-brick/blob/master/os_brick/initiator/connector.py#L1459

Revision history for this message
Eli Qiao (taget-9) wrote :

fixed by I181b594a3119f7ad74c595fc7059d521079b1d74

Changed in nova:
assignee: lvmxh (shaohef) → nobody
status: Incomplete → Fix Released
Revision history for this message
Eli Qiao (taget-9) wrote :

rootwrap: update ln --symbolic filter for FS and FC type volume drivers

Cinder change I03f8cae05cc117e14f7482115de685fc9f3fa54a sets the
'encrypted' key for all cinder volume drivers connection_info. When run
through the encrypted volume tests in Tempest, this hits the encryption
providers in Nova that fail for certain types of volume drivers, like
file system and fibre channel, due to the rootwrap filter not matching.

This change updates the symbolic link rootwrap filter so it works with
file system and fibre channel type volume backends rather than just
iSCSI.

The /dev/mapper/ prefix is always set in the encryptor modules, so that
can remain as before.

The symbolic link path is a complete wildcard, however, because the file
system volume backends all have a configurable option for the mount path
prefix, which defaults to $state_path/mnt but may not be that value.

An example call for NFS:

ln --symbolic --force \
/dev/mapper/volume-f5684ecc-959f-4de8-8d62-a8adf4bdb4cc \
/opt/stack/data/nova/mnt/21dd48babac42ae884d1192b8697a041/\
volume-f5684ecc-959f-4de8-8d62-a8adf4bdb4cc

An example call for fibre channel:

ln --symbolic --force \
/dev/mapper/pci-0000:06:00.0-fc-0x5006016508603f9f-lun-151 \
/dev/disk/by-path/pci-0000:06:00.0-fc-0x5006016508603f9f-lun-151

This change also updates the sg_info and sgscan entries to reference the
correct module since those are not called from nova.virt.libvirt.volume
anymore.

Closes-Bug: #1470142
Related-Bug: #1440227

Change-Id: I181b594a3119f7ad74c595fc7059d521079b1d74

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.