Bug 2120973 - Don't trigger udev with --test
Summary: Don't trigger udev with --test
Keywords:
Status: NEW
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: LVM Team
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-24 08:27 UTC by Marius Vollmer
Modified: 2023-08-10 15:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
pm-rhel: lvm-technical-solution?
pm-rhel: lvm-test-coverage?


Attachments (Terms of Use)
Proposed patch (953 bytes, patch)
2022-08-24 08:27 UTC, Marius Vollmer
no flags Details | Diff
Proposed patch (943 bytes, patch)
2022-08-24 09:45 UTC, Marius Vollmer
no flags Details | Diff

Description Marius Vollmer 2022-08-24 08:27:39 UTC
Created attachment 1907329 [details]
Proposed patch

Description of problem:

When using "lvcreate --test", some udev events are still triggered.

Version-Release number of selected component (if applicable):
v2_03_16

How reproducible:
Always

Steps to Reproduce:
1. udevadm monitor
2. lvcreate --test vgroup0 -n lvol0 -L10M

Actual results:
udev CHANGE events happen for the PVs of vgroup0

Expected results:
No CHANGE events happen.

Comment 1 Marius Vollmer 2022-08-24 09:45:07 UTC
Created attachment 1907348 [details]
Proposed patch

Comment 2 Zdenek Kabelac 2022-08-30 17:00:12 UTC
Well this is not so easy  -  the whole point of '--test' is to check as close to 'reality' how the command can proceed - and one part of testing is to check write mode is accessible - of course complex target like thin-pool are really hard to check this way - so the --test environment at some point becomes less useful.

Note - running udev change event is not considered harmful and again it's more closer to the actual command process if it would be executed directly.

I guess you are trying to misuse lvcreate with -vvvv for some 'other then designed' support  (BZ #2121015)

ATM attached patch is not acceptable as it would break the real purpose of --test option.

But there could be some more thinking about some way how to expose possible 'allocations' made by command since also 'lvconvert' can be doing allocations - so the universal option needs some brainstorming - but it's related to the better allocation internal API that would then be possibly better accessible for such queries
(as lvm2 was simply not designed for such use case).


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