RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2160217 - lvm create kvdo module mismatches should return non zero
Summary: lvm create kvdo module mismatches should return non zero
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.2
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-11 19:52 UTC by Corey Marthaler
Modified: 2023-11-07 11:28 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.03.21-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:53:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6686 0 None None None 2023-05-16 00:15:06 UTC
Red Hat Issue Tracker RHELPLAN-144878 0 None None None 2023-01-11 19:54:05 UTC
Red Hat Product Errata RHBA-2023:6633 0 None None None 2023-11-07 08:53:53 UTC

Description Corey Marthaler 2023-01-11 19:52:46 UTC
Description of problem:
kernel module mismatches tend to happen quite a bit. They should let the user know of a return code failure.

[root@virt-540 ~]# lvs -a -o +devices
  LV       VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                 
  root     rhel_virt-540 -wi-ao----  <6.20g                                                     /dev/vda2(205)          
  swap     rhel_virt-540 -wi-ao---- 820.00m                                                     /dev/vda2(0)            
  vdo_pool vdo_sanity    -wi-a-----  25.00g                                                     /dev/mapper/vdo_stack(0)

[root@virt-540 ~]# lvconvert --yes --type vdo-pool -n vdo_lv  -V 2T vdo_sanity/vdo_pool
modprobe: FATAL: Module kvdo not found in directory /lib/modules/5.14.0-229.el9.x86_64
  /usr/sbin/modprobe failed: 1
  vdo: Required device-mapper target(s) not detected in your kernel.
[root@virt-540 ~]# echo $?
0


Version-Release number of selected component (if applicable):
kernel-5.14.0-229.el9    BUILT: Thu Jan  5 05:38:37 PM CET 2023
kmod-kvdo-8.2.1.3-64.el9_2    BUILT: Thu Dec 15 07:03:12 PM CET 2022
lvm2-2.03.17-4.el9    BUILT: Tue Jan 10 06:40:12 PM CET 2023
lvm2-libs-2.03.17-4.el9    BUILT: Tue Jan 10 06:40:12 PM CET 2023

Comment 1 Andy Walsh 2023-02-15 18:39:22 UTC
I don't think this is intended to be redirected to me on account of the module rebuild requirements.  I think what Corey is asking for, is that the lvm command handles and reports the error condition better.

For example, if I run `lvconvert --yes --type vdo-pool -n vdo_lv  -V 2T vdo_sanity/vdo_pool` and the module can't be loaded via modprobe... It should return an error like "Unable to load required kvdo kernel module" rather than a random modprobe failure output.

Is that correct, corey?

Comment 2 Corey Marthaler 2023-02-15 22:53:13 UTC
(In reply to Andy Walsh from comment #1)
> I don't think this is intended to be redirected to me on account of the
> module rebuild requirements.  I think what Corey is asking for, is that the
> lvm command handles and reports the error condition better.
> 
> For example, if I run `lvconvert --yes --type vdo-pool -n vdo_lv  -V 2T
> vdo_sanity/vdo_pool` and the module can't be loaded via modprobe... It
> should return an error like "Unable to load required kvdo kernel module"
> rather than a random modprobe failure output.
> 
> Is that correct, corey?

Exactly. At a minimum, return non zero, better yet, a warning/error like mentioned in comment #1.

Comment 3 Zdenek Kabelac 2023-02-17 14:00:07 UTC
Ahh right - I've originally got impression from the title it's been bug about missing kvdo module.

Looking closer - yep lvconvert internally misinterpreted error handling path -
fixed with this upstream patch:

https://listman.redhat.com/archives/lvm-devel/2023-February/024616.html

Few more similar issues were also fixed for Pool/RAID and Integrity conversion with this patch.

With patch we now correctly return exit code 5.

Comment 5 Corey Marthaler 2023-05-18 22:23:52 UTC
Marking Verified:Tested in the latest rpms.

kernel-5.14.0-312.el9    BUILT: Thu May 11 08:04:19 PM CEST 2023
lvm2-2.03.21-1.el9    BUILT: Fri Apr 21 02:33:33 PM CEST 2023
lvm2-libs-2.03.21-1.el9    BUILT: Fri Apr 21 02:33:33 PM CEST 2023


[root@virt-521 ~]# lvcreate --yes --type vdo -n vdo_lv  -L 25G vdo_sanity -V 2T
modprobe: FATAL: Module kvdo not found in directory /lib/modules/5.14.0-312.el9.x86_64
  /usr/sbin/modprobe failed: 1
  vdo: Required device-mapper target(s) not detected in your kernel.
  Run `lvcreate --help' for more information.
[root@virt-521 ~]# echo $?
3

Comment 8 Corey Marthaler 2023-05-26 14:55:19 UTC
Fixed in the latest build as well. Marking VERIFIED.

kernel-5.14.0-312.el9    BUILT: Thu May 11 08:04:19 PM CEST 2023
lvm2-2.03.21-2.el9    BUILT: Thu May 25 12:03:04 AM CEST 2023
lvm2-libs-2.03.21-2.el9    BUILT: Thu May 25 12:03:04 AM CEST 2023


[root@virt-521 ~]# lvcreate --yes --type vdo -n vdo_lv  -L 25G vdo_sanity -V 2T
modprobe: FATAL: Module kvdo not found in directory /lib/modules/5.14.0-312.el9.x86_64
  /usr/sbin/modprobe failed: 1
  vdo: Required device-mapper target(s) not detected in your kernel.
  Run `lvcreate --help' for more information.
[root@virt-521 ~]# echo $?
3

Comment 11 errata-xmlrpc 2023-11-07 08:53:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6633


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