Bug 1372272
Summary: | lvmconf passing with "Failed to execute operation" systemd error | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Roman Bednář <rbednar> |
Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
lvm2 sub component: | Default / Unclassified | QA Contact: | cluster-qe <cluster-qe> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | unspecified | ||
Priority: | unspecified | CC: | agk, ccaulfie, cluster-maint, cmarthal, heinzm, jbrassow, msnitzer, prajnoha, prockai, rbednar, thornber, zkabelac |
Version: | 7.3 | ||
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.02.170-2.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 21:47:18 UTC | 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1385242 |
Description
Roman Bednář
2016-09-01 09:58:19 UTC
These are 'outputs' of systemctl commands. I'm affaid that lvm2 could only through the output to /dev/null or let it pass. For now I'm convinced showing it is better option here. At least user knows he has something wrong in systemd world. Operation 'success' result code is suggesting lvm2 has been properly modified. Reported systemd errors are unrelated to this (though still worth to check and fix if you are admin of that box...) Maybe we could 'prefix' these 'external' command traces with some headings. i.e. output of systemctl would be pipe though 'awk' so each such line would start with 'systemctl: ' prefix, to make it more clear..... Update: systemd causing the errors seems to be dependent on following packages: corosynclib-devel.x86_64 lvm2-cluster-standalone.x86_64 Errors are gone after installing those. Anyway, dependencies on devel package does not seem ok. It might be a corosync issue. For RHEL7, officially, we depend completely on pacemaker to set up the clvmd/cmirrord to set up services. The lvm2-cluster-standalone is only for testing in RHEL7 (not for production). ...which means that in RHEL7, we don't use "--service" with lvmconf. And, I don't remember now exactly, but I think that pacemaker uses lvmconf itself to have lvm.conf correctly set. So, in RHEL7, the lvmconf should not be even used normally by end users, all should go through pacemaker which sets up things for lvm2 to work in cluster. We should add a note in man lvmconf about this so it's more clear... This is NOTHING to do with corosync. If lvm2-cluster-standalone needs corosynclib-devel for some weird reason, it's something what should be fixed in lvm2-cluster-standalone package. If lvm2-lvmetad.socket needs lvm2-cluster-standalone (it looks so) it should be fixed in lvm2-lvmetad.socket service. (In reply to Roman Bednář from comment #0) > [root@virt-249 ~]# lvmconf --enable-cluster --services --startstopservices > Warning: Stopping lvm2-lvmetad.service, but it can still be activated by: > lvm2-lvmetad.socket > Removed symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket. > Unit lvm2-cluster-activation.service could not be found. > Failed to execute operation: Access denied > Failed to start lvm2-cluster-activation.service: Unit not found. > Well, I've double-checked and actually, we already do check for "loaded" state of lvm2-cluster-activation.service systemd unit. And if it's not loaded (also meaning not installed), then we do skip any handling of this service. Can you still reproduce? If so, can you add "set -x" at the very beginning of /usr/sbin/lvmconf script so we I can see the debug output for this part exactly: if [ "$type" = "systemd" ]; then if [ "$action" = "activate" ]; then for i in $@; do eval $($SYSTEMCTL_BIN show $i -p LoadState) test "$LoadState" = "loaded" || continue $SYSTEMCTL_BIN enable $i if [ "$START_STOP_SERVICES" = "1" ]; then $SYSTEMCTL_BIN start $i fi The "SYSTEMCTL_BIN enable" and "SYSTEMCTL_BIN start" should be skipped, hence we shouldn't even get into a situation where "Unit not found" is issued. Fixed here: https://sourceware.org/git/?p=lvm2.git;a=commit;h=448bf9491a10715650569d5eeceb1026941d70ae Verified. lvmconf now skips lvm2-cluster-activation.service if it's not loaded/installed. # rpm -q lvm2-cluster-standalone-2.02.171-1.el7.x86_64 package lvm2-cluster-standalone-2.02.171-1.el7.x86_64 is not installed # lvmconfig | grep locking_type locking_type=1 # systemctl is-active lvm2-lvmetad active # lvmconf --enable-cluster --services --startstopservices Warning: Stopping lvm2-lvmetad.service, but it can still be activated by: lvm2-lvmetad.socket Removed symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket. # lvmconfig | grep locking_type locking_type=3 # systemctl is-active lvm2-lvmetad inactive ###With lvm2-cluster-standalone testing package installed: # rpm -q lvm2-cluster-standalone-2.02.171-1.el7.x86_64 lvm2-cluster-standalone-2.02.171-1.el7.x86_64 # ps -ef | grep lvm root 3622 1 0 10:52 ? 00:00:00 /usr/sbin/lvmetad -f root 4125 31994 0 10:53 pts/0 00:00:00 grep --color=auto lvm # lvmconf --enable-cluster --services --startstopservices Warning: Stopping lvm2-lvmetad.service, but it can still be activated by: lvm2-lvmetad.socket Removed symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket. Created symlink from /etc/systemd/system/multi-user.target.wants/lvm2-cluster-activation.service to /usr/lib/systemd/system/lvm2-cluster-activation.service. # ps -ef | grep lvm root 4267 1 0 10:53 ? 00:00:00 /usr/sbin/clvmd -T30 root 4286 31994 0 10:53 pts/0 00:00:00 grep --color=auto lvm # lvmconf --disable-cluster --services --startstopservices Created symlink from /etc/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket to /usr/lib/systemd/system/lvm2-lvmetad.socket. Removed symlink /etc/systemd/system/multi-user.target.wants/lvm2-cluster-activation.service. # /usr/tests/sts-rhel7.4/lvm2/bin/lvm_rpms 3.10.0-664.el7.x86_64 lvm2-2.02.171-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 lvm2-libs-2.02.171-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 lvm2-cluster-2.02.171-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 device-mapper-1.02.140-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 device-mapper-libs-1.02.140-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 device-mapper-event-1.02.140-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 device-mapper-event-libs-1.02.140-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 device-mapper-persistent-data-0.7.0-0.1.rc6.el7 BUILT: Mon Mar 27 17:15:46 CEST 2017 cmirror-2.02.171-1.el7 BUILT: Wed May 3 14:05:13 CEST 2017 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, 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-2017:2222 |