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 1830535 - crm_node -n does not output the remote node
Summary: crm_node -n does not output the remote node
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pacemaker
Version: 8.2
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: 8.3
Assignee: Ken Gaillot
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1833384
TreeView+ depends on / blocked
 
Reported: 2020-05-02 15:18 UTC by Michele Baldessari
Modified: 2020-11-04 04:01 UTC (History)
5 users (show)

Fixed In Version: pacemaker-2.0.4-2.el8
Doc Type: Bug Fix
Doc Text:
Cause: Pacemaker did not initialize a variable used to inspect a command-line node name request from a Pacemaker Remote node. Consequence: "crm_node -n", when run manually or scripted on a Pacemaker Remote node (calls from within a resource agent executed by Pacemaker were not affected), sometimes reports the name of the cluster node hosting the remote connection instead of the Pacemaker Remote node's name. Fix: The variable is now initialized properly. Result: "crm_node -n" reliably reports the correct name on a Pacemaker Remote node.
Clone Of:
: 1833384 (view as bug list)
Environment:
Last Closed: 2020-11-04 04:00:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4804 0 None None None 2020-11-04 04:01:08 UTC

Description Michele Baldessari 2020-05-02 15:18:21 UTC
Description of problem:
I was always under the impression that crm_node -n returns the name used by the cluster for the node where I run this command.

But running it on a remote it outputs the node running the remote resource in charge of the remote instead:
[root@compute-0 pcmk_remote]# crm_node -n
database-0

That sounds a bit wrong? If that is expected, let me know and I'll open a PR to amend the manpage.

Version:
pacemaker-2.0.3-5.el8.x86_64

Comment 1 Ken Gaillot 2020-05-04 16:12:53 UTC
Definitely a regression in upstream 2.0.3 / RHEL 8.2 :-(

Comment 2 Ken Gaillot 2020-05-05 22:16:01 UTC
Fixed upstream by commit 40fbb833

This was an uninitialized memory bug that has actually been hiding out since upstream 1.1.19 / 2.0.0. Apparently whether the uninitialized variable had a "bad" value or not was partly affected by the particular build, so we likely just got lucky with 8.0 and 8.1.

The issue only affects "crm_node -n" when run on Pacemaker Remote nodes manually or scripted (calls from resource agents executed by the cluster are not affected).

Comment 11 Patrik Hagara 2020-09-23 11:15:10 UTC
before (2.0.3-5.el8)
====================

> [root@virt-078 ~]# pcs status
> Cluster name: STSRHTS12473
> Cluster Summary:
>   * Stack: corosync
>   * Current DC: virt-080 (version 2.0.3-5.el8-4b1f869f0f) - partition with quorum
>   * Last updated: Wed Sep 23 13:13:24 2020
>   * Last change:  Wed Sep 23 13:13:20 2020 by root via cibadmin on virt-078
>   * 4 nodes configured
>   * 5 resource instances configured
> 
> Node List:
>   * Online: [ virt-078 virt-079 virt-080 ]
>   * RemoteOnline: [ virt-081 ]
> 
> Full List of Resources:
>   * fence-virt-078	(stonith:fence_xvm):	Started virt-079
>   * fence-virt-079	(stonith:fence_xvm):	Started virt-080
>   * fence-virt-080	(stonith:fence_xvm):	Started virt-080
>   * fence-virt-081	(stonith:fence_xvm):	Started virt-078
>   * virt-081	(ocf::pacemaker:remote):	Started virt-078
> 
> Daemon Status:
>   corosync: active/enabled
>   pacemaker: active/enabled
>   pcsd: active/enabled
> [root@virt-078 ~]# ssh virt-081 crm_node -n
> virt-078

result: `crm_node -n` from remote node prints the name of the full node hosting the pacemaker remote connection resource, which is incorrect


after (2.0.4-6.el8)
===================

> [root@virt-187 ~]# pcs status
> Cluster name: STSRHTS6022
> Cluster Summary:
>   * Stack: corosync
>   * Current DC: virt-189 (version 2.0.4-6.el8-2deceaa3ae) - partition with quorum
>   * Last updated: Wed Sep 23 13:03:21 2020
>   * Last change:  Wed Sep 23 12:32:15 2020 by root via cibadmin on virt-187
>   * 4 nodes configured
>   * 5 resource instances configured
> 
> Node List:
>   * Online: [ virt-187 virt-188 virt-189 ]
>   * RemoteOnline: [ virt-190 ]
> 
> Full List of Resources:
>   * fence-virt-187	(stonith:fence_xvm):	 Started virt-188
>   * fence-virt-188	(stonith:fence_xvm):	 Started virt-189
>   * fence-virt-189	(stonith:fence_xvm):	 Started virt-189
>   * fence-virt-190	(stonith:fence_xvm):	 Started virt-187
>   * virt-190	(ocf::pacemaker:remote):	 Started virt-187
> 
> Daemon Status:
>   corosync: active/enabled
>   pacemaker: active/enabled
>   pcsd: active/enabled
> [root@virt-187 ~]# ssh virt-190 crm_node -n
> virt-190

result: `crm_node -n` from remote node prints the remote node's name

Comment 14 errata-xmlrpc 2020-11-04 04:00:53 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 (pacemaker bug fix and enhancement update), 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/RHEA-2020:4804


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