Bug 786552 - qpid-config --passive does not work as expected
Summary: qpid-config --passive does not work as expected
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-tools
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 3.0
: ---
Assignee: Darryl L. Pierce
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-01 18:15 UTC by Leonid Zhaldybin
Modified: 2015-06-22 00:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-22 21:43:53 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 738587 0 unspecified CLOSED qpid-config '--passive, --dry-run' parameters documentation 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 738588 0 medium CLOSED 'qpid-config --passive' help 2021-02-22 00:41:40 UTC

Description Leonid Zhaldybin 2012-02-01 18:15:50 UTC
Description of problem:
The help message for qpid-config --passive states, that it should be used to check if such a queue (or an exchange) can be created:

qpid-config --help | grep -A 3 passive
    --passive, --dry-run
                        Do not actually add the exchange or queue, ensure that
                        all parameters and permissions are correct and would
                        allow it to be created.

Instead, it returns an error if the queue or exchange with the given name does not exist on the broker:

[root@lzhaldyb-rhel62x ~]# qpid-config add queue test --passive
Failed: SessionException: ExecutionException(error_code=404, command_id=serial(72), class_code=8, command_code=1, field_index=0, description=u'not-found: Queue not found: test (qpid/broker/SessionAdapter.cpp:686)', error_info={}, channel=1, id=serial(75))

And if the queue or exchange with the given name already exists, then it just returns 0:
[root@lzhaldyb-rhel62x ~]# qpid-config add queue test
[root@lzhaldyb-rhel62x ~]# qpid-config add queue test --passive
[root@lzhaldyb-rhel62x ~]# echo $?
0


Version-Release number of selected component (if applicable):
python-qpid-0.14-1.el6.noarch
python-qpid-qmf-0.14-3.el6.x86_64
qpid-cpp-client-0.14-1.el6.x86_64
qpid-cpp-client-devel-0.14-1.el6.x86_64
qpid-cpp-client-devel-docs-0.12-6.el6.noarch
qpid-cpp-server-0.14-1.el6.x86_64
qpid-cpp-server-devel-0.14-1.el6.x86_64
qpid-cpp-server-store-0.14-1.el6.x86_64
qpid-cpp-server-xml-0.14-1.el6.x86_64
qpid-java-client-0.14-1.el6.noarch
qpid-java-common-0.14-1.el6.noarch
qpid-java-example-0.14-1.el6.noarch
qpid-qmf-0.14-3.el6.x86_64
qpid-tools-0.14-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Run the command to check if a queue or an exchange can be created (qpid-config add queue new_queue --passive)
  
Actual results:
Returns an error if such queue or exchange is not present, returns 0 otherwise.

Expected results:
Error in case that such queue or exchange is already present (thus, cannot be created again). Success if such queue or exchange can be created.

Additional info:

Comment 2 Justin Ross 2013-02-22 21:43:53 UTC
As of 0.18, the --passive option no longer exists.


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