Bug 1272027 - Remove obtain_device_list_from_udev from vdsm private lvm configuration
Summary: Remove obtain_device_list_from_udev from vdsm private lvm configuration
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.17.9
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ovirt-3.6.1
: 4.17.11
Assignee: Fred Rolland
QA Contact: Elad
URL:
Whiteboard: storage
: 1272026 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-15 10:05 UTC by Nir Soffer
Modified: 2016-01-19 15:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-19 15:37:13 UTC
oVirt Team: Storage
Embargoed:
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 13:45 UTC, Fred Rolland
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 47430 0 master MERGED lvm: Use udev cache for obtaining device list Never
oVirt gerrit 47810 0 ovirt-3.6 MERGED lvm: Use udev cache for obtaining device list Never

Description Nir Soffer 2015-10-15 10:05:35 UTC
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 10:17:14 UTC
We started using obtain_device_list_from_udev=0 here:

commit 23ce1d87fa98f35d83005e2958ff4065b78ff9d8
Author: Nir Soffer <nsoffer>
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>
    Reviewed-on: http://gerrit.ovirt.org/20890
    Reviewed-by: Dan Kenigsberg <danken>
    Reviewed-by: Ayal Baron <abaron>
    Reviewed-by: Allon Mureinik <amureini>

Comment 2 Allon Mureinik 2015-10-15 12:18:37 UTC
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 13:15:02 UTC
(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 11:17:27 UTC
The plan is to remove the parameter "obtain_device_list_from_udev"

Comment 5 Red Hat Bugzilla Rules Engine 2015-10-19 10:55:51 UTC
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 12:30:53 UTC
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 07:55:22 UTC
(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 19:13:42 UTC
*** Bug 1272026 has been marked as a duplicate of this bug. ***

Comment 9 Nir Soffer 2015-10-22 19:16:13 UTC
Fred, would you explain how to verify this?

Comment 10 Fred Rolland 2015-10-26 13:45:04 UTC
Created attachment 1086520 [details]
Test script

Python code for test concurrent creation of LVs

Comment 11 Fred Rolland 2015-10-26 13:57:54 UTC
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 14:02:51 UTC
(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 2015-10-29 12:44:33 UTC
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 16:43:33 UTC
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 18:08:32 UTC
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 10:24:06 UTC
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.