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

Bug 637751

Summary: qpid-config should check queue/exchange parameters more properly
Product: Red Hat Enterprise MRG Reporter: Frantisek Reznicek <freznice>
Component: qpid-qmfAssignee: messaging-bugs <messaging-bugs>
Status: CLOSED UPSTREAM QA Contact: Messaging QE <messaging-qe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: jross
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:13:34 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-09-27 10:04:27 UTC
Description of problem:

The management qpid-config tool does not have any information about message store parameters and thus allows creation queues / exchanges with parameters which are not valid.

Case a] --file-count=0 --file-size=0 should be illegal
add queue qname --file-count=0 --file-size=0 --durable --cluster-durable ; 
echo $?
  This command now passes and even 'qpid-config | grep queues' gives:
    qname \t\t\t --durable --cluster-durable --file-size=0 --file-count=0


Case b] --file-count=-1 --file-size=-1 should be illegal
  The command now hangs for x86_64 or fails with (i386):
[root@mrg-qe-07 _x]# qpid-config add queue qname_b --file-count=128 --file-size=33333 --durable --cluster-durable ; echo $?
Failed: SessionException: (None, 'Queue qname_b: create() failed: jexception 0x0401 fcntl::clean_file() threw JERR_FCNTL_WRITE: Unable to write to file. (wr_size=2097152 errno=22 (Invalid argument)) (MessageStoreImpl.cpp:505)')
1
    

Case c]  --file-count>64 or --file-size>32768 should either default to maximal numbers or (64, 32768) or refuse the operation
  The command now hangs for x86_64 or fails with (i386):
[root@mrg-qe-07 _x]# qpid-config add queue qname_b --file-count=128 --file-size=33333 --durable --cluster-durable ; echo $?
Failed: SessionException: (None, 'Queue qname_b: create() failed: jexception 0x0401 fcntl::clean_file() threw JERR_FCNTL_WRITE: Unable to write to file. (wr_size=2097152 errno=22 (Invalid argument)) (MessageStoreImpl.cpp:505)')
1


This is seen on RHEL4.8 / 5.5 i386 / x86_64.

I believe the above cases should either:
- fail with description that those values put into --file-count and/or --file-size are illegal
or
- the parameters should default to min/max values as qpidd does for instance in the case of 'qpidd --num-jfiles=1' (which defaults to --num-jfiles=4)

The currently known valid ranges should be:
  --file-count=4 ...64
  --file-size=1 ... 32768
as MRG User Guide chapter 6.3.


Version-Release number of selected component (if applicable):
python-qmf-0.7.946106-13.el5
python-qpid-0.7.946106-14.el5
qmf-0.7.946106-17.el5
qmf-devel-0.7.946106-17.el5
qpid-cpp-*-0.7.946106-17.el5
qpid-dotnet-0.4.738274-2.el5
qpid-java-*-0.7.946106-10.el5
qpid-tools-0.7.946106-11.el5
ruby-qpid-0.7.946106-2.el5


How reproducible:
100%

Steps to Reproduce:
1. qpid-config add queue qname_a --file-count=0 --file-size=0 --durable --cluster-durable
2. qpid-config add queue qname_b --file-count=-3 --file-size=-5 --durable --cluster-durable
2. qpid-config add queue qname_b --file-count=128 --file-size=33333 --durable --cluster-durable
  
Actual results:
Queues are created even with illegal parameters (0,0) or fails with store exception or hangs.

Expected results:
Illegal store parameters should either default to min/max values or an qpid-config exception should be thrown and operation cancelled.

Additional info:

[root@mrg-qe-01 _x]# qpid-config add queue qname0 --file-count=0 --file-size=0 --durable --cluster-durable ; echo $?
0
[root@mrg-qe-01 _x]# qpid-config queues | grep qname0
qname0                                                      --durable --cluster-durable --file-size=0 --file-count=0

Comment 5 Red Hat Bugzilla 2025-02-10 03:13:34 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.