Bug 454401 - cman_tool nodes -a loops indefinitely
cman_tool nodes -a loops indefinitely
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: Christine Caulfield
Cluster QE
: ZStream
Depends On:
Blocks: 460065
  Show dependency treegraph
Reported: 2008-07-08 05:36 EDT by Christine Caulfield
Modified: 2009-04-16 18:51 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 16:52:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix (506 bytes, patch)
2008-07-08 05:49 EDT, Christine Caulfield
no flags Details | Diff

  None (edit)
Description Christine Caulfield 2008-07-08 05:36:20 EDT
Description of problem:

The command

  # cman_tool nodes -a

Loops indefinitely showing the same node over and over again. It must be killed
with ^C.

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

5.0 upwards. (not in stable2 or git master)

How reproducible:

Every time

Steps to Reproduce:
1. Start up a cluster of more than one node
2. Type 'cman_tool nodes -a'
Actual results:

Node  Sts   Inc   Joined               Name
   1   M  160824   2008-07-08 04:06:49  node-01
   4   M  160836   2008-07-08 04:07:22  node-04
   4   M  160836   2008-07-08 04:07:22  node-04
   4   M  160836   2008-07-08 04:07:22  node-04
   4   M  160836   2008-07-08 04:07:22  node-04
   4   M  160836   2008-07-08 04:07:22  node-04
   4   M  160836   2008-07-08 04:07:22  node-04

... ad infinitum

Expected results:

Show me all the nodes (with addresses) and then stop.

Additional info:

This is a stupid variable reuse bug. "i" is used to loop round the nodes list
AND the node's address list. I blame FORTRAN.
Comment 1 Christine Caulfield 2008-07-08 05:49:23 EDT
Created attachment 311248 [details]
Patch to fix

The patch is simple enough.
Comment 3 Christine Caulfield 2008-07-15 03:19:59 EDT
I don't think this can be a regression. By my examination of the code cman_tool
nodes -a has always had this bug. 

See git commit 9098e9cc1ba4a11bd94876697728f6f44ab380ff where the feature was
Comment 4 Issue Tracker 2008-07-18 14:53:04 EDT
This is broken for at least 5.1 and 5.2.  So please build against:

RHEL 5.2
32 & 64 bit
What ever version shipped with 5.2, I think cman-2.0.84-2.el5

Internal Status set to 'Waiting on SEG'

This event sent from IssueTracker by jwilleford 
 issue 191211
Comment 5 Christine Caulfield 2008-07-28 03:26:32 EDT
The fix hasn't been committed to git yet. I'm still waiting for ACKs
Comment 7 RHEL Product and Program Management 2008-07-28 08:51:19 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 12 Christine Caulfield 2008-08-13 12:20:07 EDT
The fix is now in the RHEL5 branch of git:

commit feafe729f0fa9104854c1a79f59a5ff5813db828
Author: Christine Caulfield <ccaulfie@redhat.com>
Date:   Wed Aug 13 17:16:46 2008 +0100

    cman: Fix cman_tool nodes -a
Comment 15 Nate Straz 2008-12-04 15:21:11 EST
Verified against cman-2.0.97-1.el5.

[root@marathon-01 fs]# cman_tool nodes -a
Node  Sts   Inc   Joined               Name
   1   M      4   2008-12-01 14:32:46  marathon-01
   2   M      8   2008-12-01 14:32:48  marathon-02
   3   M     12   2008-12-01 14:32:51  marathon-03
   4   M     16   2008-12-01 14:32:52  marathon-04
   5   M     20   2008-12-01 14:32:53  marathon-05
[root@marathon-01 fs]#
Comment 17 errata-xmlrpc 2009-01-20 16:52:26 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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