Bug 454401

Summary: cman_tool nodes -a loops indefinitely
Product: Red Hat Enterprise Linux 5 Reporter: Christine Caulfield <ccaulfie>
Component: cmanAssignee: Christine Caulfield <ccaulfie>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 5.3CC: bkahn, bstevens, casmith, cluster-maint, edamato, jwilleford, sputhenp, tao
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:52:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 460065    
Attachments:
Description Flags
Patch to fix none

Description Christine Caulfield 2008-07-08 09:36:20 UTC
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
       Addresses: 10.16.32.101 
   4   M  160836   2008-07-08 04:07:22  node-04
       Addresses: 10.16.32.104 
   4   M  160836   2008-07-08 04:07:22  node-04
       Addresses: 10.16.32.104 
   4   M  160836   2008-07-08 04:07:22  node-04
       Addresses: 10.16.32.104 
   4   M  160836   2008-07-08 04:07:22  node-04
       Addresses: 10.16.32.104 
   4   M  160836   2008-07-08 04:07:22  node-04
       Addresses: 10.16.32.104 
   4   M  160836   2008-07-08 04:07:22  node-04
       Addresses: 10.16.32.104 

... 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 09:49:23 UTC
Created attachment 311248 [details]
Patch to fix

The patch is simple enough.

Comment 3 Christine Caulfield 2008-07-15 07:19:59 UTC
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
introduced.

Comment 4 Issue Tracker 2008-07-18 18:53:04 UTC
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 07:26:32 UTC
The fix hasn't been committed to git yet. I'm still waiting for ACKs

Comment 7 RHEL Program Management 2008-07-28 12:51:19 UTC
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
release.

Comment 12 Christine Caulfield 2008-08-13 16:20:07 UTC
The fix is now in the RHEL5 branch of git:

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

    cman: Fix cman_tool nodes -a

Comment 15 Nate Straz 2008-12-04 20:21:11 UTC
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
       Addresses: 10.15.89.71 
   2   M      8   2008-12-01 14:32:48  marathon-02
       Addresses: 10.15.89.72 
   3   M     12   2008-12-01 14:32:51  marathon-03
       Addresses: 10.15.89.73 
   4   M     16   2008-12-01 14:32:52  marathon-04
       Addresses: 10.15.89.74 
   5   M     20   2008-12-01 14:32:53  marathon-05
       Addresses: 10.15.89.75 
[root@marathon-01 fs]#

Comment 17 errata-xmlrpc 2009-01-20 21:52:26 UTC
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.

http://rhn.redhat.com/errata/RHBA-2009-0189.html