Description of problem: If a user has configured LVM using ``vdsm-tool config-lvm-filter``, the localdisk hook cannot access the ovirt-local VG. User visible symptoms are failing to start a VM using the localdisk hook. If the user did not configure LVM filter, or if the LVM filter includes the ovirt-local VG devices, the localdisk hook is not effected. Version-Release number of selected component (if applicable): 4.20.9 How reproducible: Always Steps to Reproduce: 1. Configure lvm filter on a host: $ echo yes | vdsm-tool config-lvm-filter 2. Create ovirt-local vg on a host (assuming /dev/sdb1 is an unused device to be used by the ovirt-local vg) $ pvcreate /dev/sdb1 $ vgcreate ovirt-local /dev/sdb1 $ lvcreate --type thin-pool -L100g -n pool0 ovirt-local 3. Configure a vm with the localdisk custom property (both "lvm" and "lvmthin" should be tested) 4. Start the vm on the host configured in step 2 Actual results: VM fail to start Expected results: VM started successfuly Workaround: Add the ovirt-local pvs to the lvm filter: filter = [ "a|^/dev/sda2$|", "a|^/dev/sdb1|", "r|.*|" ] With this filter, vdsm-tool config-lvm-filter will refuse to configure the filter automatically.
Here is a session showing how to test that the localdisk-helper is working properly. The localdisk-helper is internal command used by the localdisk hook to manage logical volumes. 1. This host has a strict filter, hiding the ovirt-local vg: # lvmconfig devices/filter filter=["a|^/dev/vda2$|","r|.*|"] 2. Only the host system lvs are visible by default # lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert lv_home vg0 -wi-ao---- 924.00m lv_root vg0 -wi-ao---- 14.60g lv_swap vg0 -wi-ao---- 4.00g 3. The admin can access the ovirt-local vg using a permissive filter # lvs --config 'devices {filter=["a|.*|"]}' ovirt-local LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert pool0 ovirt-local twi---tz-- 40.00g 0.00 0.49 test ovirt-local Vwi-a-tz-- 10.00g pool0 0.00 4. The localdisk-helper can access the vg # /usr/libexec/vdsm/localdisk-helper -h usage: localdisk-helper [-h] {list,create,remove,change} ... oVirt local disk hook helper optional arguments: -h, --help show this help message and exit commands: {list,create,remove,change} list return a json with the the lv attributes, tags, and size create Create a LV. return nothing remove Remove a LV. return nothing change Update a LV. return nothing # /usr/libexec/vdsm/localdisk-helper list test { "report": [ { "lv": [ {"lv_name":"test", "lv_attr":"Vwi---tz--", "lv_tags":"updating", "lv_size":"10737418240"} ] } ] } # /usr/libexec/vdsm/localdisk-helper create --addtag updating --size 1g test2 # /usr/libexec/vdsm/localdisk-helper list test2 { "report": [ { "lv": [ { "lv_name":"test2", "lv_attr":"-wi-a-----", "lv_tags":"updating", "lv_size":"1073741824" } ] } ] } # /usr/libexec/vdsm/localdisk-helper change --deltag updating test2 # /usr/libexec/vdsm/localdisk-helper change --deltag updating test # /usr/libexec/vdsm/localdisk-helper list test2 { "report": [ { "lv": [ { "lv_name":"test2", "lv_attr":"-wi-a-----", "lv_tags":"", "lv_size":"1073741824" } ] } ] } # /usr/libexec/vdsm/localdisk-helper list test { "report": [ { "lv": [ { "lv_name":"test", "lv_attr":"Vwi---tz--", "lv_tags":"", "lv_size":"10737418240" } ] } ] } # /usr/libexec/vdsm/localdisk-helper remove test # /usr/libexec/vdsm/localdisk-helper remove test2 # /usr/libexec/vdsm/localdisk-helper list test { "report": [ { "lv": [ ] } ] } # /usr/libexec/vdsm/localdisk-helper list test2 { "report": [ { "lv": [ ] } ] }
Verified with the following code: ------------------------------------------- vdsm-4.19.45-1.el7ev.x86_64 ovirt-engine-4.1.9.1-0.1.el7.noarch Verified with the following scenario: ------------------------------------------- Steps to Reproduce: 1. Configure lvm filter on a host: $ echo yes | vdsm-tool config-lvm-filter 2. Create ovirt-local vg on a host (assuming /dev/sdb1 is an unused device to be used by the ovirt-local vg) $ pvcreate /dev/sdb1 $ vgcreate ovirt-local /dev/sdb1 $ lvcreate --type thin-pool -L100g -n pool0 ovirt-local 3. Configure a vm with the localdisk custom property (both "lvm" and "lvmthin" should be tested) 4. Start the vm on the host configured in step 2 Actual results: VM started Moving to VERIFIED!
This bugzilla is included in oVirt 4.1.9 release, published on Jan 24th 2018. Since the problem described in this bug report should be resolved in oVirt 4.1.9 release, published on Jan 24th 2018, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.