Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 654020

Summary: Queue policy properties reported by QMF should match the real ones in the broker
Product: Red Hat Enterprise MRG Reporter: Frantisek Reznicek <freznice>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED ERRATA QA Contact: Petr Matousek <pematous>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: esammons, gsim, iboverma, jneedle, kgiusti, pematous, tross
Target Milestone: 2.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-server-0.9.1079953-1, qpid-tools-0.9.1078967-1 Doc Type: Bug Fix
Doc Text:
Cause Declaring a queue with invalid arguments (e.g. max_count="foo" or max_size=-1) Consequence The invalid values would be ignored, but querying the queues arguments (e.g. using QMF) would return the original invalid values. Fix If a queue-declare has invalid values for arguments, the declare is now rejected entirely. Result The queue-declare attempt fails.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-23 15:48:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frantisek Reznicek 2010-11-16 16:29:19 UTC
Description of problem:

Bug 647861 fixes bad handling of the queue policy values (max queue count bytesize) the way that if incorrect values (non-integer or integer <0) are supplied then default queue policy is used and qpidd warning is issued.

Unfortunately there can be the mismatch between real broker queue policy parameters and ones reported by QMF if user supply invalid queue policy for instance:
 "q_rep; {create: always, node: {x-declare:{arguments: {'qpid.max_count':3.14159, 'qpid.max_size':'flummery'}}}}"

leads to default queue policy 0/104857600L internally inside broker, but QMF reports 3.14159/'flummery'.



Version-Release number of selected component (if applicable):
qpid-cpp-server-0.7.946106-21

How reproducible:
100%

Steps to Reproduce:
1. sender=/usr/share/doc/python-qpid-0.7.946106/examples/api/spout
   ${sender} "q_rep; {create: always, node:
{x-declare:{arguments:{'qpid.max_count':3.14159, 'qpid.max_size':
'flummery'}}}}" --count 5 ; echo $?

2. qpid-tool feed 'list queue' and show the queue 'q_rep'

More detailed information can be seen here:
https://bugzilla.redhat.com/show_bug.cgi?id=647861#c14
  
Actual results:
QMF reported queue policy may be incorrect.

Expected results:
QMF reported queue policy should always reflect real queue policy.

Additional info:

Comment 1 Gordon Sim 2011-02-25 21:00:50 UTC
Fixed upstream: http://svn.apache.org/viewvc?rev=1074697&view=rev

This change properly rejects attempts to create queues with invalid arguments rather than ignoring them but returning the original values when queried. (I.e. an improved fix to Bug 647861).

Comment 2 Gordon Sim 2011-02-25 21:00:50 UTC
    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:
Cause
    Declaring a queue with invalid arguments (e.g. max_count="foo" or max_size=-1)    

Consequence
    The invalid values would be ignored, but querying the queues arguments (e.g. using QMF) would return the original invalid values.    

Fix
    If a queue-declare has invalid values for arguments, the declare is now rejected entirely.

Result
    The queue-declare attempt fails.

Comment 3 Petr Matousek 2011-04-20 16:15:27 UTC
This issue has been fixed

Verified on RHEL4.9, RHEL5.6 and RHEL6.1, architectures: i386, x86_64

packages installed:
python-qpid-0.10-1.el5
python-qpid-qmf-0.10-2.el5
qpid-cpp-client-0.10-3.el5
qpid-cpp-client-devel-0.10-3.el5
qpid-cpp-client-devel-docs-0.10-3.el5
qpid-cpp-client-ssl-0.10-3.el5
qpid-cpp-mrg-debuginfo-0.10-3.el5
qpid-cpp-server-0.10-3.el5
qpid-cpp-server-cluster-0.10-3.el5
qpid-cpp-server-devel-0.10-3.el5
qpid-cpp-server-ssl-0.10-3.el5
qpid-cpp-server-store-0.10-3.el5
qpid-cpp-server-xml-0.10-3.el5
qpid-java-client-0.10-2.el5
qpid-java-common-0.10-2.el5
qpid-java-example-0.10-2.el5
qpid-java-jca-0.10-2.el5
qpid-qmf-0.10-2.el5
qpid-qmf-devel-0.10-2.el5
qpid-tools-0.10-3.el5

-> VERIFIED

Comment 4 errata-xmlrpc 2011-06-23 15:48:20 UTC
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/RHEA-2011-0890.html