Description of problem: # This feature is TP in RHOSP16.1 and RHOSP16.2 but I'm reporting this bug # because its implementation is available in RHOSP16.y and stable/train. When LVMFilterEnabled: true is set in a template file, overcloud deployment always fails at the following task. ~~~ TASK [tripleo_lvmfilter : collect in-use lvm2 devices list] ******************** ~~~ It seems the tripleo_lvmfilter role doesn't handle an empty list properly and put an invalid filter definition [heat-admin@compute-0 ~]$ sudo cat /etc/lvm/lvm.conf ... devices { ... global_filter=["","r|.*|"] ... } ... ~~~ Version-Release number of selected component (if applicable): RHOSP16.1.6 How reproducible: Always Steps to Reproduce: 1. Deploy overcloud with LVMFilterEnabled: true Actual results: Deployment fails at the tripleo_lvmfilter role Expected results: Deployment succeeds without any error Additional info:
hello, I think [1] is only setting in the lvm global_filter any a|| item if at least one item is in the allowed_devices list; our best option is probably to default LVMFilterAllowlist parameter to ['.*'] instead can you confirm the above to be working for you when set in a custom env file? as a result the lvm conf should look like: global_filter=["a|.*|","r|.*|"] 1. https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/roles/tripleo_lvmfilter/tasks/main.yml#L47
Hi Giulio, Unfortunately I don't have a handy deployment to test the whole deployment so could not yet test usage of the template parameter I have tested the minimum steps implemented in tripleo_lvmfilter but it seems that deny rule is ignored when LVMFilterAllowlist: ['.*'] is set and we need to get rid of that allow expression. [heat-admin@controller-0 ~]$ sudo vi /etc/lvm/lvm.conf ... devices { global_filter=["","r|.*|"] <==== This is what is set by default now } ... [heat-admin@controller-0 ~]$ sudo vgscan Configuration setting "devices/global_filter" invalid. It cannot be set to an empty value. Pattern must begin with 'a' or 'r'. Invalid filter pattern "". Failed to create global regex device filter <==== The vgscan command fails [heat-admin@controller-0 ~]$ sudo vi /etc/lvm/lvm.conf ... devices { global_filter=["a|.*|","r|.*|"] <==== Add both rules } ... [heat-admin@controller-0 ~]$ sudo vgscan Found volume group "cinder-volumes" using metadata type lvm2 <==== LVM is still detected [heat-admin@controller-0 ~]$ sudo lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert cinder-volumes-pool cinder-volumes twi-a-tz-- 15.20g 0.00 10.57 [heat-admin@controller-0 ~]$ sudo vgs VG #PV #LV #SN Attr VSize VFree cinder-volumes 1 1 0 wz--n- <16.00g 780.00m [heat-admin@controller-0 ~]$ sudo vi /etc/lvm/lvm.conf ... devices { global_filter=["r|.*|"] <==== define only deny rule } ... [heat-admin@controller-0 ~]$ sudo vgscan [heat-admin@controller-0 ~]$ <==== LVM is no longer detected [heat-admin@controller-0 ~]$ sudo lvs [heat-admin@controller-0 ~]$
hi, thanks for pinging back; I think I have a working patch in https://review.opendev.org/812568
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 (Red Hat OpenStack Platform 16.1.8 bug fix and enhancement 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. https://access.redhat.com/errata/RHBA-2022:0986