Bug 1020210 - crm_master ignores option to specify nodename
crm_master ignores option to specify nodename
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pacemaker (Show other bugs)
6.5
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Andrew Beekhof
Cluster QE
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-17 05:47 EDT by Frank Danapfel
Modified: 2014-10-14 03:33 EDT (History)
6 users (show)

See Also:
Fixed In Version: pacemaker-1.1.12-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-14 03:33:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frank Danapfel 2013-10-17 05:47:26 EDT
Description of problem:
According to the help of crm_master it is possible to specify the cluster node to use:

-N, --node=value Set an attribute for the named node (instead of the current one).

However this option is ignored since the Nodename is hardcoded in the commandline when "crm_attribute is called:

# cat /usr/sbin/crm_master
...
crm_attribute -N `crm_node -n` -n master-$OCF_RESOURCE_INSTANCE $options


Version-Release number of selected component (if applicable):
pacemaker-1.1.10-14.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Try to query value of master score on other node:
node1# crm_master -N node2 -l reboot -r prm_RH2_SCS -G

Actual results:
Always returns value from current node:
node1# crm_master -l reboot -r prm_RH2_SCS -G
scope=status  name=master-prm_RH2_SCS value=100
node1# crm_master -N node2 -l reboot -r prm_RH2_SCS -G
scope=status  name=master-prm_RH2_SCS value=100


Expected results:
Should return info for other node. Or if this doesn't make sense the info about the "-N" option should be removed from the help text and the man-page of crm_master.

Additional info:
Comment 2 RHEL Product and Program Management 2013-10-20 06:44:41 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 3 Andrew Beekhof 2013-11-13 00:58:24 EST
A related patch has been committed upstream:
  https://github.com/beekhof/pacemaker/commit/dc2d0e6

with subject:

   Fix: crm_master: Avoid sending redundant "--node" options to crm_attribute

Further details (if any):
Comment 4 Andrew Beekhof 2013-11-13 01:00:07 EST
What is the context of this report?
crm_master shouldn't really be used outside of a resource agent (which doesn't have a reason to use -N).
Comment 5 Frank Danapfel 2013-11-14 06:45:24 EST
(In reply to Andrew Beekhof from comment #4)
> What is the context of this report?
> crm_master shouldn't really be used outside of a resource agent (which
> doesn't have a reason to use -N).

When I was playing around with the "showscores.sh" script I thought I could use the query option (-G) of crm_master to get better information about where pacemaker decided to place a master and a slave resource, and noticed that even though "crm_master advertises the option to specify a node this option isn't actually used because the nodename is hardcoded later in the script.
Comment 6 Andrew Beekhof 2014-01-13 00:14:11 EST
If necessary we can backport dc2d0e6, but since crm_master is just a wrapper for crm_attribute, it doesn't seem critical.
Comment 7 Fabio Massimo Di Nitto 2014-01-13 00:17:42 EST
(In reply to Andrew Beekhof from comment #6)
> If necessary we can backport dc2d0e6, but since crm_master is just a wrapper
> for crm_attribute, it doesn't seem critical.

And all of those crm_foobar command should be masked behind pcs calls. We are not going to support direct calls to crm_* (except crm_report perhaps). Let's make sure that pcs will grow the ability to handle it.
Comment 8 Andrew Beekhof 2014-01-14 00:11:42 EST
Sounds sane, closing. We'll pick up the fix in the next rebase in due course
Comment 13 errata-xmlrpc 2014-10-14 03:33:25 EDT
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-1544.html

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