Bug 619502 - qpid-stat -q reports a given queue n times for an n node cluster
Summary: qpid-stat -q reports a given queue n times for an n node cluster
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf   
(Show other bugs)
Version: beta
Hardware: All Linux
medium
medium
Target Milestone: 1.3
: ---
Assignee: Ken Giusti
QA Contact: Jan Sarenik
URL:
Whiteboard:
Keywords:
Depends On: 522039
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-29 17:12 UTC by Gordon Sim
Modified: 2014-07-01 12:22 UTC (History)
2 users (show)

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-30 02:04 UTC, Ken Giusti
no flags Details | Diff

Description Gordon Sim 2010-07-29 17:12:14 UTC
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-30 00:34:14 UTC
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-30 02:04:53 UTC
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 07:18:00 UTC
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 12:45:32 UTC
Submitted above patch upstream: 

Committed revision 980766.

Comment 6 Jan Sarenik 2010-09-07 13:01:52 UTC
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.