Bug 619502 - qpid-stat -q reports a given queue n times for an n node cluster
qpid-stat -q reports a given queue n times for an n node cluster
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf (Show other bugs)
beta
All Linux
medium Severity medium
: 1.3
: ---
Assigned To: Ken Giusti
Jan Sarenik
:
Depends On: 522039
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-29 13:12 EDT by Gordon Sim
Modified: 2014-07-01 08:22 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed fix (1.93 KB, patch)
2010-07-29 22:04 EDT, Ken Giusti
no flags Details | Diff

  None (edit)
Description Gordon Sim 2010-07-29 13:12:14 EDT
Description of problem:

qpid-stat -q reports a given queue n times for an n node cluster

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

qpid trunk r980198

How reproducible:

100%

Steps to Reproduce:
1. start n node cluster (where n > 1)
2. add a queue (e.g. qpid-config add queue my-queue)
3. qpid-stat -q
  
Actual results:

The created queue appears n times.

Expected results:

The created queue should really only appear once.
Comment 1 Ken Giusti 2010-07-29 20:34:14 EDT
It seems that qpid-stat is designed to act this way.

When qpid-stat connects to the target broker, it sends a query for the package "cluster", and, if present, it then queries for a list of cluster objects.  Using that list of cluster objects, it builds up a list of ip-address:port addresses for each broker in the cluster.  

It then sends a separate query to each of these brokers, which results in the duplicate entries.

It would be trivial to disable this behavior by default, and add a command line option if the old behavior is desired.
Comment 2 Ken Giusti 2010-07-29 22:04:53 EDT
Created attachment 435445 [details]
proposed fix

Changes the behavior of qpid-stat to ignore cluster configuration, unless the option "-C | --cluster" is supplied.
Comment 3 Gordon Sim 2010-07-30 03:18:00 EDT
Comment on attachment 435445 [details]
proposed fix

Looks good to me, and would lead to more intuitive behaviour by default without sacrificing the full (redundant) listing where desired. Ted, what do you think?
Comment 4 Ken Giusti 2010-07-30 08:45:32 EDT
Submitted above patch upstream: 

Committed revision 980766.
Comment 6 Jan Sarenik 2010-09-07 09:01:52 EDT
Verified on qpid-tools-0.7.946106-10.el5

# qpid-stat -q | awk '{print $1}' | sed 1,3d | sort | uniq -c
      1 my-queue
      1 qmfc-v2-hb-slanina.24315.1
      1 qmfc-v2-slanina.24315.1
      1 qmfc-v2-ui-slanina.24315.1
      1 reply-slanina.24315.1
      1 topic-slanina.24315.1

# qpid-stat -Cq | awk '{print $2}' | sed 1,3d | sort | uniq -c
      2 my-queue
      2 qmfc-v2-hb-slanina.24157.2
      1 qmfc-v2-hb-slanina.24157.3
      2 qmfc-v2-slanina.24157.2
      1 qmfc-v2-slanina.24157.3
      2 qmfc-v2-ui-slanina.24157.2
      1 qmfc-v2-ui-slanina.24157.3
      2 reply-slanina.24157.2
      1 reply-slanina.24157.3
      2 topic-slanina.24157.2
      1 topic-slanina.24157.3

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