Bug 1024685 - Creating a queue with invalid settings results in no queue but only its management object exists
Summary: Creating a queue with invalid settings results in no queue but only its manag...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 3.0
Hardware: All
OS: All
low
medium
Target Milestone: 3.1
: ---
Assignee: Pavel Moravec
QA Contact: Petra Svobodová
URL:
Whiteboard:
Depends On:
Blocks: 1168261
TreeView+ depends on / blocked
 
Reported: 2013-10-30 09:03 UTC by Pavel Moravec
Modified: 2018-12-03 20:30 UTC (History)
5 users (show)

Fixed In Version: qpid-cpp-0.30-2
Doc Type: Bug Fix
Doc Text:
It was discovered that an attempt to create a queue with invalid settings created management object for the queue, but not the queue itself. This caused the user to assume a management queue had been created, when in fact the management object contained no attached queue. The error handling mechanism is now updated to ensure the management object is not created if a queue request contains invalid settings.
Clone Of:
: 1168261 (view as bug list)
Environment:
Last Closed: 2015-04-14 13:47:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-5281 0 None None None Never
Red Hat Product Errata RHEA-2015:0805 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.1 Release 2015-04-14 17:45:54 UTC

Description Pavel Moravec 2013-10-30 09:03:19 UTC
Description of problem:
An attempt to create a queue with invalid settings (like max-queue-count < flow-stop-count) returns a QMF error and the queue is not created (can't send messages there or subscribe a consumer to it). But relevant QMF object is still present (listing all queues finds it).


Version-Release number of selected component (if applicable):
qpid-cpp-server-0.22-23.el6.x86_64


How reproducible:
100%


Steps to Reproduce:
0. rm -rf /var/lib/qpidd/* /var/lib/qpidd/.*; service qpidd restart
1. qpid-config add queue WrongQueue1 --max-queue-count=1 --flow-stop-count=100 --durable
2. qpid-send -a WrongQueue1 -m1
3. qpid-config queues WrongQueue1


Actual results:
1. returns:
Failed: Exception: Exception from Agent: {u'error_code': 7, u'error_text': 'invalid-argument: Queue "WrongQueue1": qpid.flow_stop_count=100 must be less than qpid.max_count=1 (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/QueueFlowLimit.cpp:58)'}

2. returns:
2013-10-30 07:57:18 [Client] warning Exception received from broker: not-found: not-found: Queue not found: WrongQueue1 (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/QueueRegistry.cpp:127) [caused by 2 \x08:\x01]
qpid-send: Queue WrongQueue1 does not exist

3. returns:
Queue Name   Attributes
===================================
WrongQueue1  --durable --max-queue-count=1 --flow-stop-count=100 


Expected results:
1. and 2. as actual results, but 3. should return no such queue


Additional info:
Continuing in the reproducer, restarting the broker and running "qpid-config queues WrongQueue1" again shows no such queue exists - despite the queue was attempted to be created as durable. That just supports the theory that Queue object has not been created but its Management version was.

Comment 1 Pavel Moravec 2013-10-30 09:04:25 UTC
Just FYI, the behaviour has been changed since MRG 2.3 / qpid 0.18, where the queue is created (despite the QMF error returned), what prevents successfull broker restart later on.

Comment 2 Pavel Moravec 2013-11-19 16:01:16 UTC
Fixed in upstream by commit r1543449.

Comment 4 Petra Svobodová 2014-10-31 15:52:46 UTC
Now the non existing queue object is not displayed in the "qpid-config queues" list.

Verified on qpid-cpp-0.30-3, qpid-tools-0.30-1 on Rhel6.6-i386 and x86_64.

--> VERIFIED

Comment 8 errata-xmlrpc 2015-04-14 13:47:07 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.

https://rhn.redhat.com/errata/RHEA-2015-0805.html


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