Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 537481 - qpid-stat needs option to link sesion to queue via subscription object
qpid-stat needs option to link sesion to queue via subscription object
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf (Show other bugs)
1.1.6
All Linux
high Severity medium
: 1.3
: ---
Assigned To: Nuno Santos
Frantisek Reznicek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-13 14:36 EST by Carl Trieloff
Modified: 2015-11-15 20:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, 'qpid-stat' did not contain options for a subscription object (links a queue to a session) in QMF. With this update, the following options are introduced: - for a specific session, displays the list of subscriptions and the queue names connected to the subscription. - for a specific queue, displays the subscriptions, and for each subscription the session and connection including the process and its pid.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-14 12:09:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0773 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging and Grid Version 1.3 2010-10-14 11:56:44 EDT

  None (edit)
Description Carl Trieloff 2009-11-13 14:36:50 EST
There is now a subscription object in QMF, which links the queue to the session.

We need to add options to qpid-stat that.

- show for session the list of subscriptions and the queue names connected to the subscription.
- show for a queue, the subscripons, and for each subscription the session and connection including the process and pid.


Carl.
Comment 2 Nuno Santos 2010-03-01 16:06:37 EST
I've committed a change at svn rev 917718 that displays subscription information, relating queues, sessions, and connections.

The sorting functionality can be used to group the subscription info by queue (add "-S queue" to the command line) or by connection (add "-S connection").
Comment 4 Frantisek Reznicek 2010-09-22 07:17:31 EDT
Although the feature was implemented (the -u switch was added), there were uncovered following issues:
- basic 'qpid-stat -u'
  - works if run one instance of the command at one time
  - the implementation is not thread safe as if there are two instances of 'qpid-stat -u' overlapping then first one will do the operation the second one will fail with:

  RHEL4 and also RHEL5 case:
  [root@mrg-qe-07 ~]# qpid-stat -u
  Failed: IndexError - list index out of range
  Traceback (most recent call last):
    File "/usr/bin/qpid-stat", line 528, in ?
      bm.display()
    File "/usr/bin/qpid-stat", line 466, in display
      self.displayMain(_types[0], _types[1:])
    File "/usr/bin/qpid-stat", line 445, in displayMain
      elif main == 'u': self.displaySubscriptions(subs)
    File "/usr/bin/qpid-stat", line 418, in displaySubscriptions
      row.append(self.qmf.getObjects(_objectId=s.queueRef)[0].name)
  IndexError: list index out of range

- the filtering feature of qpid-stat
  - works ok on RHEL5
  - on RHEL4 gives:

  [root@mrg-qe-07 ~]# qpid-stat -u -S queue
  Failed: TypeError - sort() takes no keyword arguments
  Traceback (most recent call last):
    File "/usr/bin/qpid-stat", line 528, in ?
      bm.display()
    File "/usr/bin/qpid-stat", line 466, in display
      self.displayMain(_types[0], _types[1:])
    File "/usr/bin/qpid-stat", line 445, in displayMain
      elif main == 'u': self.displaySubscriptions(subs)
    File "/usr/bin/qpid-stat", line 433, in displaySubscriptions
      sorter = Sorter(heads, rows, _sortcol, _limit, _increasing)
    File "/usr/lib/python2.3/site-packages/qpid/disp.py", line 224, in   __init__
      list.sort(reverse=not inc)
  TypeError: sort() takes no keyword arguments

These are two separate issues with qpid-stat at the moment (coming from package qpid-tools-0.7.946106-10.el4/5).

First one may be addressed as separate defect, but the second one should be solved within this defect record as the sorting was part of the solution mentioned by description and also comment 2.

-> ASSIGNED
Comment 5 Ted Ross 2010-09-22 08:51:37 EDT
Both issues are fixed upstream in revision 999918.
Comment 6 Frantisek Reznicek 2010-09-23 04:50:14 EDT
An re-test update:

The concurrent run issue was resolved by qpid-tools-0.7.946106-11, but the other sorting issue on RHEL4 which points to qpid/disp.py is still present as python-qpid was not rebuilt yet.

At the moment I'm using:
qpid-tools-0.7.946106-11.el4/5
python-qpid-0.7.946106-14.el4/5
Comment 8 Frantisek Reznicek 2010-09-24 08:09:35 EDT
The above mentioned RHEL4 sorting issue is now addressed separately as bug 637127.
The sorting option is actually fully orthogonal to the list of subscriptions as the sorting was implemented in 1.2 version already and subscription list was added post 1.2.

The feature was implemented and is functional, tested on RHEL 4.8 / 5.5 i386 / x86_64 on packages:
qpid-tools-0.7.946106-11.el4/5
python-qpid-0.7.946106-14.el4/5

-> VERIFIED
Comment 9 Martin Prpič 2010-10-07 09:59:07 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, 'qpid-stat' did not contain options for a subscription object (links a queue to a session) in QMF. With this update, the following options are introduced:

- for a specific session, displays the list of subscriptions and the queue names connected to the subscription.
- for a specific queue, displays the subscriptions, and for each subscription the session and connection including the process and its pid.
Comment 11 errata-xmlrpc 2010-10-14 12:09:35 EDT
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/RHSA-2010-0773.html

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