Bug 1272027 - Remove obtain_device_list_from_udev from vdsm private lvm configuration
Remove obtain_device_list_from_udev from vdsm private lvm configuration
Status: CLOSED CURRENTRELEASE
Product: vdsm
Classification: oVirt
Component: Core (Show other bugs)
4.17.9
Unspecified Linux
unspecified Severity high (vote)
: ovirt-3.6.1
: 4.17.11
Assigned To: Fred Rolland
Elad
storage
:
: 1272026 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-15 06:05 EDT by Nir Soffer
Modified: 2016-01-19 10:37 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-19 10:37:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.z+
ylavi: planning_ack+
amureini: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
Test script (3.90 KB, text/plain)
2015-10-26 09:45 EDT, Fred Rolland
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 47430 master MERGED lvm: Use udev cache for obtaining device list Never
oVirt gerrit 47810 ovirt-3.6 MERGED lvm: Use udev cache for obtaining device list Never

  None (edit)
Description Nir Soffer 2015-10-15 06:05:35 EDT
Description of problem:

Vdsm overrides lvm configuration for vdsm lvm calls. We are using 
obtain_device_list_from_udev=0 which was a workaround for old udev
bugs in EL 6.

The udev issues should be fixed in Fedora 21 and EL 7.

Test vdsm without obtain_device_list_from_udev=0 and remove this
option if it works now.

The advantage should be faster operation as lvm does not have to search
/dev for block devices but get the devices from udev.

See https://bugzilla.redhat.com/show_bug.cgi?id=1259587#c11
Comment 1 Nir Soffer 2015-10-15 06:17:14 EDT
We started using obtain_device_list_from_udev=0 here:

commit 23ce1d87fa98f35d83005e2958ff4065b78ff9d8
Author: Nir Soffer <nsoffer@redhat.com>
Date:   Mon Nov 4 22:08:45 2013 +0200

    lvm: Do not use udev cache for obtaining device list
    
    lvm is obtaining the device list from udev. When using concurrently,
    udev sometimes returns incomplete list, which cause lvm to think that a
    vg is missing, and the command may fail with "Volume group not found"
    error, or "Cannot change VG test while PVs are missing".
    
    lvm fixed this issue in version 2.02.100-7.el6 by disabling udev cache,
    setting obtain_device_list_from_udev to 0. Unfortunatlly, lvm fix is not
    enough for vdsm, as the fix is applied only if no lvm.conf file exists.
    When upgrading existing lvm installation, lvm creates a lvm.conf.rpmnew
    file, and the system administrator is responsible for updating lvm
    configuration.
    
    This patch disable udev cache using the --config option, used to
    override many other lvm options, ensuring proper configuration on both
    new and upgraded systems.
    
    Disabling udev cache may have minimal performance effect according to
    lvm developers.
    
    Change-Id: Ib55c8d444f3be9f63bfd23d8def60607b5b3dff0
    Bug-Url: https://bugzilla.redhat.com/1014942
    Signed-off-by: Nir Soffer <nsoffer@redhat.com>
    Reviewed-on: http://gerrit.ovirt.org/20890
    Reviewed-by: Dan Kenigsberg <danken@redhat.com>
    Reviewed-by: Ayal Baron <abaron@redhat.com>
    Reviewed-by: Allon Mureinik <amureini@redhat.com>
Comment 2 Allon Mureinik 2015-10-15 08:18:37 EDT
The title says "Use obtain_device_list_from_udev=1", but comment 0 says:

> Test vdsm without obtain_device_list_from_udev=0 and remove this
> option if it works now.

So, just to be clear - the plan is to remove this parameter and let lvm use its own default, right?
Comment 3 Peter Rajnoha 2015-10-15 09:15:02 EDT
(In reply to Allon Mureinik from comment #2)
> The title says "Use obtain_device_list_from_udev=1", but comment 0 says:
> 
> > Test vdsm without obtain_device_list_from_udev=0 and remove this
> > option if it works now.
> 
> So, just to be clear - the plan is to remove this parameter and let lvm use
> its own default, right?

Yes.
Comment 4 Fred Rolland 2015-10-18 07:17:27 EDT
The plan is to remove the parameter "obtain_device_list_from_udev"
Comment 5 Red Hat Bugzilla Rules Engine 2015-10-19 06:55:51 EDT
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Comment 6 Fred Rolland 2015-10-20 08:30:53 EDT
Peter,

I need to add to my patch information about the udev bugs that have been solved and on which version the fixes are available.

Can you provide this info ?

Thanks,

Fred
Comment 7 Peter Rajnoha 2015-10-21 03:55:22 EDT
(In reply to Fred Rolland from comment #6)
> Peter,
> 
> I need to add to my patch information about the udev bugs that have been
> solved and on which version the fixes are available.
> 

Well, I don't remember the exact details of the bug, but there was a bugzilla report filed for that with the note that the changes won't be backported to RHEL6. I'll try to look that bug up...
Comment 8 Nir Soffer 2015-10-22 15:13:42 EDT
*** Bug 1272026 has been marked as a duplicate of this bug. ***
Comment 9 Nir Soffer 2015-10-22 15:16:13 EDT
Fred, would you explain how to verify this?
Comment 10 Fred Rolland 2015-10-26 09:45 EDT
Created attachment 1086520 [details]
Test script

Python code for test concurrent creation of LVs
Comment 11 Fred Rolland 2015-10-26 09:57:54 EDT
In order to test I used the attached code that creates LVs in different threads.

In order to use this, you need to create a ISCSI Storage Domain in engine with at least 2 LUNs.

Edit the test.py by updating the VG and LUNs IDs from your setup.

i - number of iterations
c - number of threads
python test.py -i 100 -c 30
Comment 12 Peter Rajnoha 2015-10-27 10:02:51 EDT
(In reply to Peter Rajnoha from comment #7)
> (In reply to Fred Rolland from comment #6)
> > Peter,
> > 
> > I need to add to my patch information about the udev bugs that have been
> > solved and on which version the fixes are available.
> > 
> 
> Well, I don't remember the exact details of the bug, but there was a
> bugzilla report filed for that with the note that the changes won't be
> backported to RHEL6. I'll try to look that bug up...

Sorry, I haven't found the exact bug in the end - it's been a while since then...
Comment 13 Yaniv Lavi (Dary) 2015-10-29 08:44:33 EDT
In oVirt testing is done on single release by default. Therefore I'm removing the 4.0 flag. If you think this bug must be tested in 4.0 as well, please re-add the flag. Please note we might not have testing resources to handle the 4.0 clone.
Comment 14 Sandro Bonazzola 2015-11-24 11:43:33 EST
Please set target release or I can't move the bug to ON_QA automatically.
Comment 15 Red Hat Bugzilla Rules Engine 2015-11-24 13:08:32 EST
Bug tickets that are moved to testing must have target release set to make sure tester knows what to test. Please set the correct target release before moving to ON_QA.
Comment 16 Elad 2016-01-18 05:24:06 EST
Tested concurrent creation of LVs using the code provided in comment #10. 
All operation succeeded, no error raised.


2016-01-18 12:23:21,733 INFO worker 'test-17': starting
2016-01-18 12:23:21,733 INFO creating '852aeaa3-27d9-4501-9e0e-582f46aa4c44/test-17-01'
2016-01-18 12:23:21,753 INFO worker 'test-18': starting
2016-01-18 12:23:21,753 INFO creating '852aeaa3-27d9-4501-9e0e-582f46aa4c44/test-18-01'
2016-01-18 12:23:21,758 INFO worker 'test-19': starting
2016-01-18 12:23:21,758 INFO creating '852aeaa3-27d9-4501-9e0e-582f46aa4c44/test-19-01'
2016-01-18 12:23:21,772 INFO worker 'test-20': starting



Tested using:
vdsm-4.17.17-0.el7ev.noarch
lvm2-2.02.130-5.el7.x86_64

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