Bug 1032487

Summary: Add ability create, delete and list objects of arbitrary types with qpid-config
Product: Red Hat Enterprise MRG Reporter: Gordon Sim <gsim>
Component: qpid-toolsAssignee: Gordon Sim <gsim>
Status: CLOSED ERRATA QA Contact: Valiantsina Hubeika <vhubeika>
Severity: unspecified Docs Contact:
Priority: medium    
Version: DevelopmentCC: esammons, freznice, gsim, iboverma, jross, lzhaldyb, mtoth, pematous, vhubeika
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-tools-0.22-14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-24 15:09:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gordon Sim 2013-11-20 09:47:34 UTC
Description of problem:

There are certain new broker entities that can be created in conjunction with AMQP 1.0 support, e.g. 'topics' which offer a way around the inability to configure subscription queues through addresses in qpid::messaging.

However, creating, listing and deleting isn't supported by qpid-config. The alternatives are tp use qpid-tool (which is not the most user friendly utility), qpidt (a rather raw test utility that currently isn't installed for MRG rpms) or script your own QMFv2 tool.

There is a change already upstream that adds this ability to qpid-config that could be backported if desired.

Comment 6 Leonid Zhaldybin 2014-01-22 09:19:13 UTC
I've done a quick testing of this new feature. The tool is capable of creating, listing and deleting the objects (such as topics). But if the object with this particular name is already present on the broker, an attempt to create it does not return any error or throws any warning message at least:

(0) root@lzhaldyb-rhel64x ~ $ qpid-config add topic test.topic --argument exchange=test.ex --argument durable=True
(0) root@lzhaldyb-rhel64x ~ $ qpid-config list topic
Objects of type 'topic'
  name        durable  properties  exchangeRef
  ==============================================
  test.topic  True     {}          test.ex
(0) root@lzhaldyb-rhel64x ~ $ qpid-config add topic test.topic --argument exchange=amq.direct --argument durable=False
(0) root@lzhaldyb-rhel64x ~ $ echo $?
0
(0) root@lzhaldyb-rhel64x ~ $ qpid-config list topic
Objects of type 'topic'
  name        durable  properties  exchangeRef
  ==============================================
  test.topic  True     {}          test.ex

I think that the tool should warn the user that the object already exists regardless of the object type, it already does so for queues and exchanges:

(0) root@lzhaldyb-rhel64x ~ $ qpid-config add queue test
Failed: Exception: Exception from Agent: {u'error_code': 7, u'error_text': 'object already exists: test'}

I'm returning this back to ASSIGNED.

Comment 7 Gordon Sim 2014-01-22 10:40:21 UTC
Strictly speaking the issue here is with the broker, not the tool (i.e connected with https://bugzilla.redhat.com/show_bug.cgi?id=981642). 

Fixed upstream however by https://svn.apache.org/r1560307

Comment 9 Valiantsina Hubeika 2014-07-21 13:28:41 UTC
Situation didn't change from the Comment 6.

root @rhel6i ~ $ 15:23:56 # qpid-config add exchange fanout test.ex
root @rhel6i ~ $ 15:24:10 # qpid-config add topic test.topic --argument exchange=test.ex --argument durable=True
root @rhel6i ~ $ 15:24:14 # qpid-config add topic test.topic --argument exchange=test.ex --argument durable=True
root @rhel6i ~ $ 15:24:15 # echo $?
0

Still no error in case that object already exists

Comment 14 Valiantsina Hubeika 2014-08-04 12:50:11 UTC
verified on 
qpid-tools-0.22-14

Comment 15 errata-xmlrpc 2014-09-24 15:09:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-1296.html