Bug 1483328 - [downstream clone - 4.1.7] [sos plugin] lvm commands need syntax change
Summary: [downstream clone - 4.1.7] [sos plugin] lvm commands need syntax change
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.1.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.1.7
: ---
Assignee: Ala Hino
QA Contact: Avihai
URL:
Whiteboard:
Depends On: 1474566
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-20 14:30 UTC by rhev-integ
Modified: 2019-04-28 14:25 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Previously, incorrect LVM configuration resulted in incorrect LVM output. The LVM configuration has now been fixed so that the correct LVM output is generated. The names of the generated files are as follows: lvm_lvs_-v_-o_tags_--config_global_locking_type_0_use_lvmetad_0_devices_preferred_names_.dev.mapper._ignore_suspended_devices_1_write_cache_state_0_disable_after_error_count_3_filter_a_.dev.mapper.._r lvm_pvs_-v_-o_all_--config_global_locking_type_0_use_lvmetad_0_devices_preferred_names_.dev.mapper._ignore_suspended_devices_1_write_cache_state_0_disable_after_error_count_3_filter_a_.dev.mapper.._r lvm_vgs_-v_-o_tags_--config_global_locking_type_0_use_lvmetad_0_devices_preferred_names_.dev.mapper._ignore_suspended_devices_1_write_cache_state_0_disable_after_error_count_3_filter_a_.dev.mapper.._r
Clone Of: 1474566
Environment:
Last Closed: 2017-11-07 17:29:21 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:3139 0 normal SHIPPED_LIVE VDSM bug fix and enhancement update 4.1.7 2017-11-07 22:22:40 UTC
oVirt gerrit 80452 0 master MERGED sos-plugin: Introduce collectLVMCommand helper 2017-08-21 21:45:03 UTC
oVirt gerrit 80453 0 master POST sos-plugin: Add lvm configuration when executing lvm commands 2017-08-20 14:31:24 UTC
oVirt gerrit 81722 0 ovirt-4.1 POST sos-plugin: Introduce collectLVMCommand helper 2017-09-13 20:44:16 UTC
oVirt gerrit 81723 0 ovirt-4.1 POST sos-plugin: Add lvm configuration when executing lvm commands 2017-09-13 20:44:39 UTC
oVirt gerrit 81725 0 master POST sos-plugin: Add lvm configuration when executing lvm commands 2017-09-14 11:59:30 UTC
oVirt gerrit 81883 0 ovirt-4.1 MERGED sos-plugin: Add lvm configuration when executing lvm commands 2017-09-18 12:41:13 UTC

Description rhev-integ 2017-08-20 14:30:38 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1474566 +++
======================================================================

Description of problem:

The VDSM SOS plugin, in vdsm/lib/sos/vdsm.py.in currently (even in master) does this for capture sosreport LVM information:

self.collectExtOutput("/sbin/lvm vgs -v -o +tags")
self.collectExtOutput("/sbin/lvm lvs -v -o +tags")
self.collectExtOutput("/sbin/lvm pvs -v -o +all")

With the recent changes on lvm filter and lvmetad, this needs to be reviewed so that sosreports contain correct and meaningful data.

At least two things concern me:
1) In 4.0.6 and lower, lvmetad might be running. This can yield in the sosreport showing cached, old LVM metadata, leading to incorrect support decisions.
2) Where customer manually setup lvm filtering (as recommended), or in the future where the filter might be automagic, these commands may fail to capture relevant data.

See also https://gerrit.ovirt.org/#/c/79698/

(Originally by Germano Veit Michel)

Comment 1 rhev-integ 2017-08-20 14:30:45 UTC
Is this on track to 4.1.5?

(Originally by Yaniv Kaul)

Comment 3 rhev-integ 2017-08-20 14:30:50 UTC
Hi Ala,

Following up from your email...

I think we need:
1) lvmetad=0 on each command, so that we don't ready stale metadata in RHV 4.0.6 and older.
2) filter to add the devices of the RHV Storage Domains (because the host will be blacklisting them in lvm.conf).

Otherwise sosreports might miss important data and we need to ask the customer again.

I think we need to add something similar to what VDSM does on each LVM command (in LVMCONF_TEMPLATE in vdsm/storage/lvm.py). As an example, I think each of those 3 commands in comment #0 should have a config like the below appended:
--config 'devices { filter = [ \'a|<RHV LUNS HERE?>', \'r|.*|\' ] } global {use_lvmetad=0}'

Or maybe use a "add all" filter to simplify it in case it won't cause problems.

I hope this clarifies the BZ.

Thanks

(Originally by Germano Veit Michel)

Comment 4 rhev-integ 2017-08-20 14:30:54 UTC
Thanks Germano.

I uploaded two patches targeting these requirements.

(Originally by Ala Hino)

Comment 5 rhev-integ 2017-08-20 14:30:59 UTC
If there's another 4.1.5 this should be included in it, but I won't block on it.

(Originally by Allon Mureinik)

Comment 9 Yaniv Kaul 2017-09-05 10:04:33 UTC
Is this on track to 4.1.6?

Comment 17 Avihai 2017-10-15 08:34:18 UTC
verified on vdsm 4.19.33-1 .


Current output:
> ll lvm_*
-rw-r--r--. 1 root root 13519 Oct 15 11:15 lvm_lvs_-v_-o_tags_--config_global_locking_type_0_use_lvmetad_0_devices_preferred_names_.dev.mapper._ignore_suspended_devices_1_write_cache_state_0_disable_after_error_count_3_filter_a_.dev.mapper.._r
-rw-r--r--. 1 root root 13531 Oct 15 11:15 lvm_pvs_-v_-o_all_--config_global_locking_type_0_use_lvmetad_0_devices_preferred_names_.dev.mapper._ignore_suspended_devices_1_write_cache_state_0_disable_after_error_count_3_filter_a_.dev.mapper.._r
-rw-r--r--. 1 root root  6622 Oct 15 11:15 lvm_vgs_-v_-o_tags_--config_global_locking_type_0_use_lvmetad_0_devices_preferred_names_.dev.mapper._ignore_suspended_devices_1_write_cache_state_0_disable_after_error_count_3_filter_a_.dev.mapper.._r

Comment 18 Ala Hino 2017-10-15 09:35:52 UTC
Bug was verified; removing the needinfo request

Comment 20 errata-xmlrpc 2017-11-07 17:29:21 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.

https://access.redhat.com/errata/RHEA-2017:3139


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