Bug 2059466 - skip in-use loop devices during vgcreate/vgextend
Summary: skip in-use loop devices during vgcreate/vgextend
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: lvm-operator
Version: 4.10
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ODF 4.10.0
Assignee: Leela Venkaiah Gangavarapu
QA Contact: Aviad Polak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-01 06:02 UTC by Leela Venkaiah Gangavarapu
Modified: 2023-08-09 16:46 UTC (History)
11 users (show)

Fixed In Version: 4.10.0-175
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-21 09:12:50 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage lvm-operator pull 113 0 None Merged fix: skip in-use loop devices during vgcreate/vgextend 2022-03-01 06:02:55 UTC
Github red-hat-storage lvm-operator pull 122 0 None open Bug 2059466: [release-4.10] fix: skip in-use loop devices during vgcreate/vgextend 2022-03-01 08:30:04 UTC

Description Leela Venkaiah Gangavarapu 2022-03-01 06:02:56 UTC
Description of problem (please be detailed as possible and provide log
snippests):
- When PVCs with `volumeMode: Block` are created by Topolvm, if vg-manager pod restarts/reconciles then it's adding new created in-use block PVCs to the Volume Group

Version of all relevant components (if applicable):
- 4.10

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
- Yes
- If app pods start consuming the block PVC and there'll be potential clash b/n data in Logical Volume and another new LV using the same underlying Physical Volume
- Basically, an unwanted cyclic dependency is created

Is there any workaround available to the best of your knowledge?
No

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
- 2

Can this issue reproducible?
- 100%

Can this issue reproduce from the UI?
- No

If this is a regression, please provide more details to justify this:
- No

Steps to Reproduce:
1. Deploy LVMO and create a `volumeMode: Block` PVC
2. Restart `vg-manager` pod and observe back-end loop devices which is backing the PVC created in step 1 incorrectly detected by vg-manager as usable device and existing volume group is extended

Actual results:
- Cyclic usage of block devices

Expected results:
- When a loop device is being used by k8s internally to support `volumeDevices` for a workload those devices should be skipped as not usable by vg-manager

Additional info:
-- Dev note:
- Loop devices created from truncated files which doesn't contain the string "plugins/kubernetes.io" in the backing file path can still be used for extending volume groups
- Fix exists in upstream main https://github.com/red-hat-storage/lvm-operator/pull/113

Comment 4 Aviad Polak 2022-04-10 15:20:07 UTC
looks good at 4.10:217


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