Bug 2208342

Summary: Default use_devicesfile value results in non bootable system after upgrade
Product: Red Hat Enterprise Linux 9 Reporter: Jon Magrini <jmagrini>
Component: lvm2Assignee: LVM Team <lvm-team>
lvm2 sub component: Devices, Filtering and Stacking QA Contact: cluster-qe <cluster-qe>
Status: NEW --- Docs Contact:
Severity: high    
Priority: unspecified CC: agk, byodlows, heinzm, jbrassow, msnitzer, prajnoha, rmadhuso, teigland, zkabelac
Version: 9.2   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jon Magrini 2023-05-18 16:17:52 UTC
Description of problem:
The use_devicesfile was initially introduced in RHEL-9.0 via BZ#2012830 as a means to manage LVM devices and replace the traditional filter method. However, the old filter regex default to "accept all" devices. Only a blacklist was needed. 

The introduction of use_devicesfile is enabled by default per BZ#2129176. This value results in non-bootable systems after upgrade and requires manual whitelisting of devices. 

Version-Release number of selected component (if applicable):
9.0, 9.1, 9.2

How reproducible:
Very

Steps to Reproduce:
1. Install 9.1 (single disk, multiple disk, does not matter)
2. Upgrade to 9.2
3. System drops to maintenance mode
4. The system devices file does not contain all PV's. 

Actual results:
System fails to boot and drops to maintenance mode. Requires manual intervention to either set `use_devicesfile = 0` or to manually add devices. 

Expected results:
All devices get added to system devices, or set use_devicesfile to default to off. 

Additional info:
This has affected multiple customers now, creating high visibility Sev 1 cases for support due to non bootable systems.

Comment 1 David Teigland 2023-05-18 16:31:31 UTC
Do you have some specific examples of the system.devices file prior to the update and a recreated system.devices file after the update?

Comment 2 David Teigland 2023-05-18 17:23:44 UTC
One bug has been identified in bug 2208039 that would cause this -- a change in how 9.2 handles line feed characters in wwids.

Comment 5 David Teigland 2023-05-19 19:12:13 UTC
(In reply to David Teigland from comment #2)
> One bug has been identified in bug 2208039 that would cause this -- a change
> in how 9.2 handles line feed characters in wwids.

The other bug was actually a change in handling trailing spaces in t10 wwids.  In 9.0/9.1 trailing spaces where replaced by _ and in 9.2 they are ignored.  If system.devices on 9.0 or 9.1 contains an IDNAME starting with "t10" and ending with "_" then it's likely to run into bug 2208039 on upgrade.