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 2052759 - require lvmdbusd to be explicitly enabled
Summary: require lvmdbusd to be explicitly enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-09 23:42 UTC by David Teigland
Modified: 2023-05-09 10:37 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.03.17-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:23:40 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-6156 0 None None None 2022-11-11 20:36:37 UTC
Red Hat Issue Tracker RHELPLAN-111751 0 None None None 2022-02-09 23:44:42 UTC
Red Hat Product Errata RHBA-2023:2544 0 None None None 2023-05-09 08:23:57 UTC

Description David Teigland 2022-02-09 23:42:22 UTC
Description of problem:

We should change how lvmdbusd is enabled so that simply installing the package does not cause the daemon to be actively operating on the system.  The user should take some action beyond simply installing the package to enable lvmdbusd.

(For example, installing lvmlockd does not enable it, the user needs to set lvm.conf use_lvmlockd=1 and enable/start the service.)

Having lvmdbusd operating can create notable overhead because it runs lvm commands to keep its state updated and lvm commands send messages to it.  This would be especially disruptive on systems with many devices.  It wouldn't be surprising for someone to install the package along with all lvm rpms, without an intention of using it (anaconda is the only known user.)

There are a couple possible options that come to mind for adding an "enable" step after install:

1. require the lvm2-lvmdbusd service to be explicitly enabled, rather than automatically starting it.  (I don't immediately see how to do this for a dbus service.)

2. change the default lvm.conf notify_dbus to 0.  This way lvm commands will not by default attempt to connect to lvmdbusd, which is how the daemon is started.

Another option might be a scheme in which the program using lvmdbusd starts the daemon when they want to begin using it.  In that case it would only be started and running when there was a need for it.  I don't know if there is any mechanism for this.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Teigland 2022-08-15 15:46:35 UTC
Tony suggested another solution in which lvmdbusd would listen to udev events by default, and lvm commands could stop notifying dbus by default, which would stop lvmdbusd from being automatically started by lvm commands.

Comment 2 David Teigland 2022-10-14 16:42:43 UTC
Tony, do you think there will be any changes here or should we close?

Comment 3 Tony Asleson 2022-10-17 16:31:57 UTC
I believe we should follow through with having --udev in the service file, get that integrated and then remove the code from lvm tools to do the dbus notify.  That will solve this issue too.

The interesting part is --udev is in the upstream repo service file, thus I can only conclude that during packaging a diff is applied which removes it?

I'm trying to locate the BZ what was requesting --udev being used to solve an installer problem with lvmdbusd.

Comment 4 Tony Asleson 2022-10-18 17:52:45 UTC
(In reply to Tony Asleson from comment #3)
> I believe we should follow through with having --udev in the service file,
> get that integrated and then remove the code from lvm tools to do the dbus
> notify.

After experimenting with this today, I think this is a bad approach.  The udev
events don't have enough context and we would end up having the lvm dbusd daemon
refresh the entire lvm state much more frequently.

Investigation continues.

Comment 5 Tony Asleson 2022-10-19 20:57:29 UTC
Correction posted upstream: https://sourceware.org/git/?p=lvm2.git;a=commit;h=0f56c1ad1262857961aff7b5a0ae6593a3de8db3
which causes the lvm command line tools to only notify the dbus daemon if the daemon is running, to prevent lvm command line
tools from starting the daemon.

Comment 11 Corey Marthaler 2022-11-18 20:11:30 UTC
Marking Verified:Tested in the latest rpms.

lvm2-2.03.17-1.el9    BUILT: Thu Nov 10 10:02:16 AM CST 2022
lvm2-libs-2.03.17-1.el9    BUILT: Thu Nov 10 10:02:16 AM CST 2022


[root@hayes-03 ~]# pvcreate /dev/sd[ef]1
  Physical volume "/dev/sde1" successfully created.
  Physical volume "/dev/sdf1" successfully created.

[root@hayes-03 ~]# ps -ef | grep lvmdbus
root       62079   54986  0 14:09 pts/0    00:00:00 grep --color=auto lvmdbus

Comment 16 Corey Marthaler 2022-12-15 18:03:09 UTC
Verified in the latest rpms as well.

kernel-5.14.0-205.el9    BUILT: Fri Dec  2 07:14:37 AM CST 2022
lvm2-2.03.17-3.el9    BUILT: Wed Dec  7 10:41:40 AM CST 2022
lvm2-libs-2.03.17-3.el9    BUILT: Wed Dec  7 10:41:40 AM CST 2022

Comment 18 errata-xmlrpc 2023-05-09 08:23:40 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:2544


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