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 1094812 - 'pcs status nodes corosync' gives an error instead of providing nodes info
Summary: 'pcs status nodes corosync' gives an error instead of providing nodes info
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs
Version: 6.5
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-06 14:21 UTC by Tomas Jelinek
Modified: 2015-12-07 14:15 UTC (History)
6 users (show)

Fixed In Version: pcs-0.9.120-2.el6
Doc Type: Bug Fix
Doc Text:
Prior to this update, pcs used the corosync.conf file when listing cluster nodes using the "pcs status nodes corosync" command. However, corosync.conf does not exist in Red Hat Enterprise Linux 6. As a consequence, "pcs status nodes corosync" failed to execute. With this update, cluster nodes on Red Hat Enterprise Linux 6 are listed using the cman_tool program and the /etc/cluster/cluster.conf file, and "pcs status nodes corosync" now functions correctly.
Clone Of:
Environment:
Last Closed: 2014-10-14 07:22:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed fix (1.92 KB, patch)
2014-05-07 12:25 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1526 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2014-10-14 01:22:04 UTC

Description Tomas Jelinek 2014-05-06 14:21:56 UTC
Description of problem:
'pcs status nodes corosync' gives "Error: unable to locate command: /usr/sbin/corosync-cmapctl" instead of providing nodes info

How reproducible:
always

Steps to Reproduce:
1. run 'pcs status nodes corosync'

Actual results:
[root@rh65-node1 pcs]# pcs status nodes corosync
Error: unable to locate command: /usr/sbin/corosync-cmapctl
[root@rh65-node1 pcs]# echo $?
1

Expected results:
[root@rh65-node1 pcs]# pcs status nodes corosync
Corosync Nodes:
 Online: rh65-node1 rh65-node2
 Offline:
[root@rh65-node1 pcs]# echo $?
0

Comment 2 Tomas Jelinek 2014-05-07 12:25:49 UTC
Created attachment 893243 [details]
Proposed fix

Comment 3 Tomas Jelinek 2014-05-07 12:30:18 UTC
Test:
[root@rh65-node1 ~]# pcs status nodes corosync
Corosync Nodes:
 Online: rh65-node1 rh65-node2
 Offline:
[root@rh65-node1 ~]# echo $?
0

[root@rh65-node2 ~]# cman_tool leave force

[root@rh65-node1 ~]# pcs status nodes corosync
Corosync Nodes:
 Online: rh65-node1
 Offline: rh65-node2
[root@rh65-node1 ~]# echo $?
0

Comment 4 Chris Feist 2014-06-11 21:49:25 UTC
Fixed in pcs-0.9.120-2.el6:

[root@bid-05 pcs]# rpm -q pcs
pcs-0.9.120-2.el6.x86_64
[root@bid-05 pcs]# pcs status nodes corosync
Corosync Nodes:
 Online: bid-05 bid-06 
 Offline:

Comment 7 errata-xmlrpc 2014-10-14 07:22:00 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.

http://rhn.redhat.com/errata/RHBA-2014-1526.html

Comment 8 Huy VU 2015-12-02 21:29:56 UTC
I am seeing this problem in pcs 0.9.139.

[root@huysnpmvm9 ~]# rpm -q pcs
pcs-0.9.139-9.el6_7.1.x86_64
[root@huysnpmvm9 ~]# pcs status nodes corosync
No such file or directory
Error: unable to locate command: /usr/sbin/corosync-cmapctl
[root@huysnpmvm9 ~]# uname -a
Linux huysnpmvm9 2.6.32-504.16.2.el6.x86_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@huysnpmvm9 ~]# cat /proc/version
Linux version 2.6.32-504.16.2.el6.x86_64 (mockbuild.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Apr 22 06:48:29 UTC 2015
[root@huysnpmvm9 ~]#
[root@huysnpmvm9 ~]# rpm -qa | grep -e coro -e pace
pacemaker-1.1.12-8.el6_7.2.x86_64
corosync-1.4.7-2.el6.x86_64
pacemaker-cli-1.1.12-8.el6_7.2.x86_64
perl-XML-NamespaceSupport-1.10-3.el6.noarch
pacemaker-libs-1.1.12-8.el6_7.2.x86_64
pacemaker-cluster-libs-1.1.12-8.el6_7.2.x86_64
corosynclib-1.4.7-2.el6.x86_64
[root@huysnpmvm9 ~]#

Comment 9 Radek Steiger 2015-12-03 11:49:43 UTC
Huy VU,

can you please provide what does "cat /etc/system-release /etc/redhat-release"  show you?

Comment 10 Huy VU 2015-12-03 15:53:46 UTC
Our company maintains a version Centos 6.6 and calls it Mitel Standard Linux.
Here's what the version files look like.

[root@huysnpmvm9 ~]# cat /etc/system-release /etc/redhat-release
Mitel Networks server 10.3.17.0
Mitel Standard Linux release 10.3.17.0
[root@huysnpmvm9 ~]#

This is equivalent to

bash-4.1$ cat /etc/system-release /etc/redhat-release
Red Hat Enterprise Linux Server release 6
CentOS release 6.6 (Final)
Red Hat Enterprise Linux Server release 6
CentOS release 6.6 (Final)

Comment 11 Chris Feist 2015-12-05 00:42:48 UTC
Huy Vu,

The problem you're seeing is that pcs is not properly detecting whether you're on a RHEL6 based system or a RHEL7 based system.

In your version of pcs it checks for the first two digits separated by a '.'.  If the first of the two digits is a 6, it assumes it's a RHEL 6 system, otherwise it assumes a RHEL 7 system.

With your system-release file it thinks it's on a RHEL 7 based system, which is why these problems are happening.

In future version of pcs for RHEL 6 we will be doing a better job of determining if it's a RHEL6 or RHEL7 system, but you'll have to wait for the 6.8 package of pcs to see those changes.

In the meantime you can fix this issue by hard coding the 'is_rhel6()' function in utils.py to always return true.

Comment 12 Huy VU 2015-12-07 14:15:44 UTC
Alright. I think I can work with that.


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