Bug 663022 - Address assertion do not work well if address type specified with python client
Summary: Address assertion do not work well if address type specified with python client
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: 1.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 2.0
: ---
Assignee: Rafael H. Schloming
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-14 13:39 UTC by Petr Matousek
Modified: 2011-06-23 15:49 UTC (History)
4 users (show)

Fixed In Version: python-qpid-0.10-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-23 15:49:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0890 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 2.0 Release 2011-06-23 15:42:41 UTC

Description Petr Matousek 2010-12-14 13:39:15 UTC
Description of problem:
Address assertion is not functional when address type specified in python client. (asserting the valid address id with wrong address type does not raise an exception)

[root@mrg-qe-16 api]# qpid-config add queue test
[root@mrg-qe-16 api]# ./spout "test ; {assert: always, node: {type:topic}}"
Message(properties={'spout-id': 'a0ab603c-4623-ca40-806e-c712e3b1b6a6:0'})
[root@mrg-qe-16 api]# echo $?
0


This was seen on RHEL 5.5 x86_64.

Version-Release number of selected component (if applicable):
python-qpid-0.7.946106-14.el5
qpid-cpp-client-0.7.946106-22.el5
qpid-cpp-client-devel-0.7.946106-22.el5
qpid-cpp-client-devel-docs-0.7.946106-22.el5
qpid-cpp-client-ssl-0.7.946106-22.el5
qpid-cpp-server-0.7.946106-22.el5
qpid-cpp-server-cluster-0.7.946106-22.el5
qpid-cpp-server-devel-0.7.946106-22.el5
qpid-cpp-server-ssl-0.7.946106-22.el5
qpid-cpp-server-store-0.7.946106-22.el5
qpid-cpp-server-xml-0.7.946106-22.el5
qpid-java-client-0.7.946106-12.el5
qpid-java-common-0.7.946106-12.el5
qpid-java-example-0.7.946106-12.el5
qpid-tools-0.7.946106-11.el5

How reproducible:
100%

Steps to Reproduce:
1. See steps below (Additional info).
  
Actual results:
Address type assertion to topic passed even if the address type is queue  
Address type assertion to queue passed even if the address type is exchange 

Expected results:
Address type assertion to topic should fail when the address type is queue  
Address type assertion to queue should fail when the address type is exchange 

Additional info:
[root@mrg-qe-16 messaging]# service qpidd restart
Stopping Qpid AMQP daemon:                                 [  OK  ]
Starting Qpid AMQP daemon:                                 [  OK  ]
[root@mrg-qe-16 messaging]# 
[root@mrg-qe-16 messaging]# qpid-config queues | grep test
[root@mrg-qe-16 messaging]# qpid-config exchanges | grep test
[root@mrg-qe-16 messaging]# 
[root@mrg-qe-16 messaging]# qpid-config add queue test
[root@mrg-qe-16 messaging]# qpid-config add exchange topic test2
[root@mrg-qe-16 messaging]# 
[root@mrg-qe-16 messaging]# qpid-config queues | grep test
test                                                
[root@mrg-qe-16 messaging]# qpid-config exchanges | grep test
topic     test2              
[root@mrg-qe-16 messaging]# 
[root@mrg-qe-16 messaging]# for i_pwd in /usr/share/doc/python-qpid-0.7.946106/examples/api /usr/share/qpidc/examples/messaging; do
>   ${i_pwd}/spout "test ; {assert: always, node: {type:topic}}" ; echo $?
>   ${i_pwd}/spout "test ; {assert: always, node: {type:queue}}" ; echo $?
>   ${i_pwd}/spout "test2 ; {assert: always, node: {type:topic}}" ; echo $?
>   ${i_pwd}/spout "test2 ; {assert: always, node: {type:queue}}" ; echo $?
> done
Message(properties={'spout-id': 'a87a144c-5887-c549-a4af-c92bc1071343:0'})
0
Message(properties={'spout-id': 'c3e0e427-7252-0349-9262-bbd49425c357:0'})
0
Message(properties={'spout-id': '1a328abf-9319-b94a-9654-6720b45cf2de:0'})
0
Message(properties={'spout-id': '54a4e0e5-d5b6-b44b-b405-4b9201f9bd72:0'})
0
2010-12-14 08:03:13 warning Exception received from broker: not-found: not-found: Exchange not found: test (qpid/broker/ExchangeRegistry.cpp:92) [caused by 1 \x07:\x01]
Exchange test does not exist
1
0
0
2010-12-14 08:03:13 warning Exception received from broker: not-found: not-found: Queue not found: test2 (qpid/broker/SessionAdapter.cpp:754) [caused by 1 \x08:\x01]
Queue test2 does not exist
1

Comment 1 Petr Matousek 2011-04-19 14:41:07 UTC
This issue has been implemented

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

packages installed:
python-qpid-0.10-1

-> VERIFIED

Comment 2 errata-xmlrpc 2011-06-23 15:49:02 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


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