Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454401 - cman_tool nodes -a loops indefinitely
Summary: cman_tool nodes -a loops indefinitely
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.3
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Christine Caulfield
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 460065
TreeView+ depends on / blocked
 
Reported: 2008-07-08 09:36 UTC by Christine Caulfield
Modified: 2009-04-16 22:51 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:52:26 UTC


Attachments (Terms of Use)
Patch to fix (deleted)
2008-07-08 09:49 UTC, Christine Caulfield
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0189 normal SHIPPED_LIVE cman bug-fix and enhancement update 2009-01-20 16:05:55 UTC

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 Product and 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@redhat.com>
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


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