Bug 1671174
Summary: | CommandRunner.run() does not prepend pacemaker_binaries directory [RHEL 7] | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Reid Wahl <nwahl> | ||||||
Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | ||||||
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 7.6 | CC: | abetkike, cfeist, cluster-maint, idevat, mmazoure, nhostako, omular, tojeline | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | pcs-0.9.168-3.el7 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause:
User runs pcs in an environment with PATH variable empty or not set.
Consequence:
Some pcs commands fail as they are unable to run pacemaker tools.
Fix:
Always specify a full path to external executables when running them from pcs.
Result:
Pcs works even if environment variable PATH is empty or not set.
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 1673825 (view as bug list) | Environment: | |||||||
Last Closed: | 2020-03-31 19:09:37 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: | |||||||||
Attachments: |
|
Description
Reid Wahl
2019-01-31 00:09:07 UTC
It is intentional that CommandRunner.run() does not modify any path it is given. It is up to its caller to determine what should be run. The bug is not in the runner. The bug is in the code calling it. We should check all places calling the CommandRunner and make sure full paths are specified in all of them. Created attachment 1546627 [details]
proposed fix
Test:
pcs should work even if environment variable PATH is empty / not set
Commands fixed by the patch:
* pcs cluster cib-push diff-against=
* pcs cluster destroy
* pcs cluster kill
* pcs cluster stop
* pcs config restore --local
* pcs qdevice kill net
* pcs status
* pcs stonith confirm
* pcs stonith fence
After Fix: [kid76 ~] $ rpm -q pcs pcs-0.9.168-1.el7.x86_64 [kid76 ~] $ PATH="" /usr/sbin/pcs cluster destroy Shutting down pacemaker/corosync services... Killing any remaining services... Removing all cluster configuration files... [kid76 ~] $ pcs status Error: cluster is not currently running on this node Created attachment 1632505 [details]
proposed fix 2
Fix reading auth tokens when PATH is empty or not set. Fixes the 'pcs cluster status' and other commands.
After Fix [kid76 ~] $ rpm -q pcs pcs-0.9.168-3.el7.x86_64 [kid76 ~] $ PATH="" [kid76 ~] $ /usr/sbin/pcs cluster start --all kid76: Starting Cluster (corosync)... lion76: Starting Cluster (corosync)... lion76: Starting Cluster (pacemaker)... kid76: Starting Cluster (pacemaker)... [kid76 ~] $ /usr/sbin/pcs cluster status Cluster Status: Stack: unknown Current DC: NONE Last updated: Mon Nov 4 16:30:25 2019 Last change: Mon Nov 4 16:30:12 2019 by hacluster via crmd on lion76 2 nodes configured 0 resources configured PCSD Status: kid76: Online lion76: Online 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-2020:0996 |