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 1650686 - vdo package does not build against latest device-mapper-event-devel package
Summary: vdo package does not build against latest device-mapper-event-devel package
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: vdo
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Andy Walsh
QA Contact: vdo-qe
URL:
Whiteboard:
Depends On: 1658630
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-16 20:42 UTC by Andy Walsh
Modified: 2021-09-06 15:25 UTC (History)
6 users (show)

Fixed In Version: lvm2-2.03.02-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1658630 (view as bug list)
Environment:
Last Closed: 2019-06-14 01:16:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fix_dmeventd_linking.patch (636 bytes, patch)
2018-11-28 20:16 UTC, Andy Walsh
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-11530 0 None Waiting on Customer RFE: podman - join multiple CNI network and set static IPs for them 2022-05-10 14:06:03 UTC

Description Andy Walsh 2018-11-16 20:42:28 UTC
Description of problem:
When attempting to rebuild the 'vdo' RPM, the build fails.  Initially it is due to a missing file of libdevmapper.h.  When the BuildRequires: is added to include device-mapper-devel, the build then fails when linking, needing an additional reference to devmapper.

Version-Release number of selected component (if applicable):
device-mapper-event-devel-1.02.153-1.el8
vdo-6.2.0.239-35.el8 (or https://github.com/dm-vdo/kvdo/tree/6.2.0.239)

How reproducible:
100%

Steps to Reproduce:
1. Install device-mapper-event-devel on RHEL8
2. Clone https://github.com/dm-vdo/vdo
3. Run make

Actual results:
First (with the missing dependency):
cc -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -g -O3 -fno-omit-frame-pointer -Wall -Wcast-align -Werror -Wextra -Winit-self -Wlogical-op -Wmissing-include-dirs -Wpointer-arith -Wredundant-decls -Wunused -Wwrite-strings    -std=c99 -Wbad-function-cast -Wcast-qual -Wfloat-equal -Wformat=2 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wswitch-default  -pedantic  -I../base -I../../uds -Wno-write-strings -DINTERNAL -DCURRENT_VERSION="\"6.2.0.273\"" "-DPLUGIN_NAME=\"libdevmapper-event-lvm2vdo.so\""   -c -MMD -MF .deps/vdodmeventd.d.new -MP -MT vdodmeventd.o -o vdodmeventd.o vdodmeventd.c
vdodmeventd.c:32:10: fatal error: libdevmapper.h: No such file or directory
 #include <libdevmapper.h>

Second (with the missing link arg):
cc -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  vdodmeventd.o libuser.a ../base/libvdo.a ../../uds/libuds.a -ldl -pthread -lz -lrt -lm -luuid "-ldevmapper-event" -o vdodmeventd
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_get_uuid'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_log_with_errno'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_set_major'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_set_uuid'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_asprintf'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_run'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_create'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_destroy'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_get_name'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_set_name'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_set_minor'
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libdevmapper-event.so: undefined reference to `dm_task_get_info'
collect2: error: ld returned 1 exit status

Expected results:
Successful build.

Additional info:
At some point, some of the symbols from device-mapper-event-devel moved to device-mapper-devel.

Comment 1 Andy Walsh 2018-11-16 20:47:16 UTC
When vdo-6.2.0.239 was originally built, the device-mapper package installed was device-mapper-event-devel-1.02.150-1.el8.

So at some point between 1.02.150 and 1.02.153, things were moved around.

I attempted to reproduce this on Fedora Rawhide, Fedora 29, and Fedora 28 without success.  So in this case, rhel8 seems to be ahead of the others for now.

Comment 2 Andy Walsh 2018-11-28 20:16:40 UTC
Created attachment 1509624 [details]
fix_dmeventd_linking.patch

In addition to adding the "BuildRequires: device-mapper-devel" to the spec, this patch is also necessary.

Comment 3 Marian Csontos 2018-12-10 16:02:24 UTC
Is this actually a bug?

I have seen a -ldevmapper used in an earlier RHEL8 brew builds, for example here:

  http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/vdo/6.2.0.273/9.el8/data/logs/x86_64/build.log

And also device-mapper-devel is installed:

  http://download.eng.bos.redhat.com/brewroot/vol/rhel-8/packages/vdo/6.2.0.273/9.el8/data/logs/x86_64/root.log

So, I wonder, have you accidentally dropped a dependency?

Comment 4 Marian Csontos 2018-12-10 16:06:10 UTC
Oh, that's a patched build, right?

Comment 5 Andy Walsh 2018-12-10 16:06:39 UTC
Yes.

If I rebuild the 6.2.0.239 version with no changes, the package will not build due to the issues mentioned in the original description.  Version 6.2.0.273-9.el8 has the changes to work with the current state of things.  It is currently only applied to the RHEL8 build and nowhere else, since it doesn't seem to affect any of the Fedora releases (or it hadn't when I filed the bug, I don't know if that is still the case).

The changes I had to apply to 6.2.0.273-9 to build is noted in Comment 2.

Comment 6 Marian Csontos 2018-12-10 16:26:31 UTC
The RPM somehow lost a dependency on `pkgconfig(devmapper)`. I will look into that tomorrow.

Comment 7 Marian Csontos 2018-12-11 14:11:24 UTC
So, the issue is, libdevmapper-event.so in 2.03 is using internal device_mapper library, but is not linking it. I will fix this.

Also, the original error suggests you are using devmapper library, but are not depending on that:

    vdodmeventd.c:32:10: fatal error: libdevmapper.h: No such file or directory

The libdevmapper-event required libdevmapper, but it does not anymore.

So you should either drop the libdevmapper.h from your code, or add BuildRequire: device-mapper-devel (as you did).

Comment 8 Andy Walsh 2018-12-11 16:23:06 UTC
Thanks.  I will make sure to keep the new 'BuildRequires: device-mapper-devel'

Comment 9 Andy Walsh 2018-12-18 18:24:24 UTC
I have tried out vdo-6.2.0.293-10.el8 against the latest lvm2 packages (lvm2-2.03.02-1.el8.x86_64).  I removed the patch to only link with "-ldevmapper-event" (Removing the added devmapper part).  The build now passes, but when a VDO volume is created, the following errors are printed in /var/log/messages:

Dec 18 13:16:07 localhost UDS/vdodmeventd[14518]: ERROR  (vdodmeventd/14518) The dynamic shared library libdevmapper-event-lvm2vdo.so could not be loaded: /lib64/libdevmapper-event-lvm2vdo.so: undefined  symbol: dm_vdo_status_parse
Dec 18 13:16:07 localhost UDS/vdodmeventd[14518]: ERROR  (vdodmeventd/14518) Failed to load the dmeventd plugin

Comment 12 Andy Walsh 2018-12-18 19:06:02 UTC
It seems that this is unlikely to be a problem with the VDO side of the software, because I'm also seeing the errors on an LVM managed VDO volume as well.

# pvcreate /dev/loop0p1
# vgcreate vdo_lvm /dev/loop0p1
# lvcreate --type vdo -L 12G vdo_lvm
# tail -15 /var/log/messages
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: underlying device, REQ_FLUSH: supported, REQ_FUA: not supported
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: Using write policy async automatically.
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: starting device 'vdo_lvm-vpool0'
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: zones: 1 logical, 1 physical, 1 hash; base thread s: 5
Dec 18 14:00:55 localhost kernel: kvdo4:journalQ: VDO commencing normal operation
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: Setting UDS index target state to online
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: device 'vdo_lvm-vpool0' started
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: resuming device 'vdo_lvm-vpool0'
Dec 18 14:00:55 localhost kernel: kvdo4:lvcreate: device 'vdo_lvm-vpool0' resumed
Dec 18 14:00:55 localhost kernel: kvdo4:packerQ: compression is enabled
Dec 18 14:00:55 localhost kernel: uds: kvdo4:dedupeQ: creating index: dev=/dev/dm-0 offset=4096 size=2781704192
Dec 18 14:00:55 localhost kernel: uds: kvdo4:dedupeQ: Using 1 indexing zone for concurrency.
Dec 18 14:00:55 localhost systemd[1]: Started Device-mapper event daemon.
Dec 18 14:00:55 localhost dmeventd[14625]: dmeventd ready for processing.
Dec 18 14:00:55 localhost dmeventd[14625]: dmeventd libdevmapper-event-lvm2vdo.so dlopen failed: /lib64/libdevmapper-event-lvm2vdo.so: undefined symbol: dm_vdo_status_parse.

Comment 16 Marian Csontos 2019-01-04 10:34:26 UTC
I have added the relevant patches:

9785e40b8d52fd87d7c451ed838f450aee41ba8d
3320ab8334794684b4d324bb78d0b293a27287a6

Comment 19 Corey Marthaler 2019-03-14 17:14:10 UTC
The latest rpms work for me as well. Marking this verified.

kernel-4.18.0-74.el8    BUILT: Wed Feb 27 12:52:17 CST 2019
lvm2-2.03.02-6.el8    BUILT: Fri Feb 22 04:47:54 CST 2019
lvm2-libs-2.03.02-6.el8    BUILT: Fri Feb 22 04:47:54 CST 2019
lvm2-dbusd-2.03.02-6.el8    BUILT: Fri Feb 22 04:50:28 CST 2019
lvm2-lockd-2.03.02-6.el8    BUILT: Fri Feb 22 04:47:54 CST 2019

device-mapper-1.02.155-6.el8    BUILT: Fri Feb 22 04:47:54 CST 2019
device-mapper-libs-1.02.155-6.el8    BUILT: Fri Feb 22 04:47:54 CST 2019
device-mapper-event-1.02.155-6.el8    BUILT: Fri Feb 22 04:47:54 CST 2019
device-mapper-event-libs-1.02.155-6.el8    BUILT: Fri Feb 22 04:47:54 CST 2019
device-mapper-persistent-data-0.7.6-1.el8    BUILT: Sun Aug 12 04:21:55 CDT 2018

vdo-6.2.0.293-10.el8    BUILT: Fri Dec 14 18:18:47 CST 2018
kmod-kvdo-6.2.0.293-50.el8    BUILT: Mon Feb 25 16:53:12 CST 2019



# Native LVM
[root@host-085 ~]# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
[root@host-085 ~]# vgcreate vdo_lvm /dev/sdb1
  Volume group "vdo_lvm" successfully created
[root@host-085 ~]# lvcreate --type vdo -L 12G vdo_lvm
  Logical volume "lvol0" created.

Mar 14 12:05:57 host-085 kernel: uds: loading out-of-tree module taints kernel.
Mar 14 12:05:57 host-085 kernel: uds: modprobe: loaded version 6.2.0.77
Mar 14 12:05:57 host-085 kernel: kvdo: modprobe: loaded version 6.2.0.293
Mar 14 12:05:59 host-085 kernel: kvdo0:lvcreate: underlying device, REQ_FLUSH: supported, REQ_FUA: supported
Mar 14 12:05:59 host-085 kernel: kvdo0:lvcreate: Using write policy async automatically.
Mar 14 12:05:59 host-085 kernel: kvdo0:lvcreate: starting device 'vdo_lvm-vpool0'
Mar 14 12:05:59 host-085 kernel: kvdo0:lvcreate: zones: 1 logical, 1 physical, 1 hash; base threads: 5
Mar 14 12:06:00 host-085 kernel: kvdo0:journalQ: VDO commencing normal operation
Mar 14 12:06:00 host-085 kernel: kvdo0:lvcreate: Setting UDS index target state to online
Mar 14 12:06:00 host-085 kernel: uds: kvdo0:dedupeQ: creating index: dev=/dev/dm-9 offset=4096 size=2781704192
Mar 14 12:06:00 host-085 kernel: kvdo0:lvcreate: device 'vdo_lvm-vpool0' started
Mar 14 12:06:00 host-085 kernel: kvdo0:lvcreate: resuming device 'vdo_lvm-vpool0'
Mar 14 12:06:00 host-085 kernel: uds: kvdo0:dedupeQ: Using 4 indexing zones for concurrency.
Mar 14 12:06:00 host-085 kernel: kvdo0:lvcreate: device 'vdo_lvm-vpool0' resumed
Mar 14 12:06:00 host-085 kernel: kvdo0:packerQ: compression is enabled
Mar 14 12:06:00 host-085 lvm[671]: Monitoring VDO pool vdo_lvm-vpool0.



# VDO
[root@host-085 ~]# vdo create --name vdo0 --device /dev/sdc1 --vdoLogicalSize=1T
Creating VDO vdo0
Starting VDO vdo0
Starting compression on VDO vdo0
VDO instance 1 volume is ready at /dev/mapper/vdo0

Mar 14 12:09:56 host-085 kernel: kvdo1:dmsetup: underlying device, REQ_FLUSH: supported, REQ_FUA: supported
Mar 14 12:09:56 host-085 kernel: kvdo1:dmsetup: Using write policy async automatically.
Mar 14 12:09:56 host-085 kernel: kvdo1:dmsetup: starting device 'vdo0'
Mar 14 12:09:56 host-085 kernel: kvdo1:dmsetup: zones: 1 logical, 1 physical, 1 hash; base threads: 5
Mar 14 12:09:57 host-085 kernel: kvdo1:journalQ: VDO commencing normal operation
Mar 14 12:09:57 host-085 kernel: kvdo1:dmsetup: Setting UDS index target state to online
Mar 14 12:09:57 host-085 kernel: kvdo1:dmsetup: device 'vdo0' started
Mar 14 12:09:57 host-085 kernel: kvdo1:dmsetup: resuming device 'vdo0'
Mar 14 12:09:57 host-085 kernel: uds: kvdo1:dedupeQ: creating index: dev=/dev/disk/by-id/scsi-36001405070fa35c329642feabfd1af88-part1 offset=4096 size=2781704192
Mar 14 12:09:57 host-085 kernel: kvdo1:dmsetup: device 'vdo0' resumed
Mar 14 12:09:57 host-085 kernel: uds: kvdo1:dedupeQ: Using 4 indexing zones for concurrency.
Mar 14 12:09:57 host-085 kernel: kvdo1:packerQ: compression is enabled
Mar 14 12:09:57 host-085 UDS/vdodmeventd[7209]: INFO   (vdodmeventd/7209) VDO device vdo0 is now registered with dmeventd for monitoring
Mar 14 12:09:57 host-085 lvm[671]: Monitoring VDO pool vdo0.


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