Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1389501

Summary: [lib] pcs assumes booth arbitrator instance to be disabled based on wrong systemd input
Product: Red Hat Enterprise Linux 7 Reporter: Radek Steiger <rsteiger>
Component: pcsAssignee: Ondrej Mular <omular>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.3CC: cfeist, cluster-maint, idevat, mlisik, omular, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.156-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: User wants to disable booth arbitrator service with command 'pcs booth disable'. Consequence: Booth arbitrator service is not disabled even though command exits successfully. Fix: Correctly check if booth service is installed. Result: Booth arbitrator service is disabled.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 18:24:40 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:

Description Radek Steiger 2016-10-27 18:22:40 UTC
> Description of problem:

Pcs uses 'systemctl list-unit-files' to determine whether a service exists or not. The problem here is that the booth uses unit file templates to spawn a named instance of booth (i.e. booth@booth), but these instances are never listed in a unit file list nor does the enablement status show up in list-units. While pcs correctly uses 'systemctl is-enabled' to figure out if it's enabled or not, the preceding check for service existence will never pass as booth@booth doesn't technically exist in the systemctl unit file listings. The correct way here would probably be to look for booth@ without an instance name first, and only then call the 'systemctl disable booth@booth' with the actual instance name.


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

pcs-0.9.152-9.el7.x86_64


> How reproducible:

Easily


> Steps to Reproduce:

1. systemctl enable booth@booth
2. pcs booth disable


> Actual results:

[root@duck-01 lib]# systemctl enable booth@booth
[root@duck-01 lib]# pcs booth disable
booth@booth disabled
[root@duck-01 lib]# systemctl is-enabled booth@booth
enabled


> Expected results:

[root@duck-01 lib]# systemctl enable booth@booth
[root@duck-01 lib]# pcs booth disable
booth@booth disabled
[root@duck-01 lib]# systemctl is-enabled booth@booth
disabled


> Additional info:

Oddly the 'pcs booth enable' works just fine as there is no such check present.

Comment 1 Ondrej Mular 2016-12-21 10:58:30 UTC
proposed fix:
https://github.com/ClusterLabs/pcs/commit/82f4970a94f8386dc2a9a9354b11a68dd5

TEST:
[root@rhel7-node1 ~]# pcs booth enable
booth@booth enabled
[root@rhel7-node1 ~]# systemctl is-enabled booth@booth
enabled
[root@rhel7-node1 ~]# pcs booth disable
booth@booth disabled
[root@rhel7-node1 ~]# systemctl is-enabled booth@booth
Failed to get unit file state for booth: No such file or directory

Comment 3 Ivan Devat 2017-02-20 07:47:00 UTC
After Fix:

[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.156-1.el7.x86_64

[vm-rhel72-1 ~] $ pcs booth enable
booth@booth enabled
[vm-rhel72-1 ~] $ systemctl is-enabled booth@booth
enabled

[vm-rhel72-1 ~] $ pcs booth disable
booth@booth disabled
[vm-rhel72-1 ~] $ systemctl is-enabled booth@booth
Failed to get unit file state for booth: No such file or directory

Comment 7 errata-xmlrpc 2017-08-01 18:24: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, 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:1958