Bug 1010390
Summary: | [amqp1.0] Assert support | ||
---|---|---|---|
Product: | Red Hat Enterprise MRG | Reporter: | Petr Matousek <pematous> |
Component: | qpid-cpp | Assignee: | Gordon Sim <gsim> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Eric Sammons <esammons> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | Development | CC: | esammons, gsim, iboverma, jross, mtoth, pematous, zkraus |
Target Milestone: | 3.0 | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qpid-cpp-0.22-30 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-01-21 12:56:46 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1010399 |
Description
Petr Matousek
2013-09-20 16:52:49 UTC
> Unexpected results > /var/dtests/node_data/clients/qc2_drain --connection-options {protocol:amqp1.0} "E735334;{ create:always,assert:always, node: { type:topic }}" > Desired capabilities not met: topic The above issue is fixed by https://svn.apache.org/r1525040 (it was an issue of not sending both the create-on-demand and topic capabilities). Fixed upstream: https://svn.apache.org/r1525858 I should point out that using assert with properties of the node uses a mechanism that strictly speaking violates the 1.0 specification and is in any case qpidd specific. The issue is that the node properties should not be sent on attach if the dynamic flag is not set (this is similar to what happens for the create option). Asserting on filters or capabilities on the other hand relies only on the standard protocol rules so should work with any compliant peer. Despite that using asserts with properties of the node is not recommended, as explained in the comment 4, most of the issues were solved. Automated tests still reports several issues when asserting the following properties: auto-delete, lvq, limit-policy, qpid.trace.id, qpid.trace.exclude amqp1.0 assert on auto-delete queue (declared either by 0-10 or 1.0): # ./spout --connection-options "{ protocol : 'amqp1.0' }" "autodel_q;{node:{x-declare:{auto-delete:True}},create:always}" OR # ./spout --connection-options "{ protocol : 'amqp0-10' }" "autodel_q;{node:{x-declare:{auto-delete: True}},create:always}" # ./spout --connection-options "{ protocol : 'amqp1.0' }" "autodel_q;{node:{x-declare:{auto-delete: True}},assert:always}" Requested node properties not met: {auto-delete:True} Type incompatibilities when using 0-10 asserts on amqp1.0 declared nodes: # ./spout --connection-options "{ protocol : 'amqp1.0' }" "testNodePropertyQueues_1;{node:{x-declare:{arguments:{qpid.last_value_queue_key:somekey}}},create:always}" # ./drain --connection-options "{ protocol : 'amqp0-10' }" "testNodePropertyQueues_1;{node:{x-declare:{arguments:{qpid.last_value_queue_key:somekey}}},assert:always}" Option qpid.last_value_queue_key does not match for testNodePropertyQueues_1, expected V2:7:str16(somekey), got V2:7:vbin16(somekey) # ./spout --connection-options "{ protocol : 'amqp1.0' }" "testNodePropertyQueues_2;{node:{x-declare:{arguments:{qpid.policy_type:reject}}}, create:always}" # ./drain --connection-options "{ protocol : 'amqp0-10' }" "testNodePropertyQueues_2;{node:{x-declare:{arguments:{qpid.policy_type:reject}}},assert:always}" Option qpid.policy_type does not match for testNodePropertyQueues_2, expected V2:6:str16(reject), got V2:6:vbin16(reject) (note: applies to all policy types: flow_to_disk, ring, ring strict..) # ./spout --connection-options "{ protocol : 'amqp1.0' }" "testNodePropertyQueues_3;{node:{x-declare:{arguments:{qpid.trace.id:trace-id}}}, create:always}" # ./drain --connection-options "{ protocol : 'amqp0-10' }" "testNodePropertyQueues_3;{node:{x-declare:{arguments:{qpid.trace.id:trace-id}}},assert:always}" Option qpid.trace.id does not match for testNodePropertyQueues_3, expected V2:8:str16(trace-id), got V2:8:vbin16(trace-id) # # ./spout --connection-options "{ protocol : 'amqp1.0' }" "testNodePropertyQueues_4;{node:{x-declare:{arguments:{qpid.trace.exclude:trace-exclude}}}, create:always}" # ./drain --connection-options "{ protocol : 'amqp0-10' }" "testNodePropertyQueues_4;{node:{x-declare:{arguments:{qpid.trace.exclude:trace-exclude}}},assert:always}" Option qpid.trace.exclude does not match for testNodePropertyQueues_4, expected V2:13:str16(trace-exclude), got V2:13:vbin16(trace-exclude) The issue with autodelete is fixed by https://svn.apache.org/r1547496. The issue regarding the type of queue properties for queue created on-demand over 1.0 is fixed by https://svn.apache.org/r1547496. Oops, sorry, I hadn't copied the new url for the second change above it seems. The fix for the property types is: https://svn.apache.org/r1547495. I.e. for clarity there are two fixes: (1) https://svn.apache.org/r1547495 (2) https://svn.apache.org/r1547496 QE note: 0-10 like node/link properties assert seems to work well now, no failures reported by automated tests To be tested: asserts on amqp1.0 capabilities I've used a amqp 1.0 client with asserts for qpid node properties created by amqp 1.0. I'm aware of Comment 4, but I wanted to be sure If we would support that. failing properties asserts: qpid.exclusive-binding:False qpid.exclusive-binding:True qpid.file_count:10 qpid.file_size:10000 qpid.ive:False qpid.msg_sequence:False qpid.msg_sequence:True qpid.optimistic_consume:False qpid.optimistic_consume:True qpid.persist_last_node:False qpid.persist_last_node:True qpid.queue_event_generation:10 qpid.sequence_counter:10 ## this could be failing due to Bug 1040526 x-qpid-capacity:10 x-qpid-flow-resume-capacity:5 x-qpid-maximum-message-age:10 So my conclusion, If we would support that, please fix it, on the other hand if we won't support that we have to make a note to documentation. addition to Comment 12 please note that following properties asserts works: 'qpid.alert_count': 10 'qpid.alert_repeat_gap': 10 'qpid.alert_size': 10 'qpid.flow_resume_count': 15 'qpid.flow_resume_size': 400 'qpid.flow_stop_count': 24 'qpid.flow_stop_size': 480 'qpid.ive': True 'qpid.last_value_queue': False 'qpid.last_value_queue_key': 'somekey' 'qpid.last_value_queue_no_browse': False 'qpid.last_value_queue_no_browse': True 'qpid.last_value_queue': True 'qpid.max_count': 64 'qpid.max_size': 512 'qpid.msg_sequence': True 'qpid.paging': False 'qpid.paging': True 'qpid.paging': True, 'qpid.max_pages_loaded': 16 'qpid.paging': True, 'qpid.page_factor': 4 'qpid.policy_type': 'reject' 'qpid.policy_type': 'ring' 'qpid.priorities': 1 'qpid.queue_msg_sequence': 'msg_sq_no' 'qpid.trace.exclude': 'trace-exclude' 'qpid.trace.id': 'trace-id' 'x-qpid-maximum-message-count': 10 'x-qpid-maximum-message-size': 10 'x-qpid-minimum-alert-repeat-gap': 10 'x-qpid-priorities': 1 (In reply to Zdenek Kraus from comment #12) > I've used a amqp 1.0 client with asserts for qpid node properties created by > amqp 1.0. I'm aware of Comment 4, but I wanted to be sure If we would > support that. > > failing properties asserts: > > qpid.exclusive-binding:False > qpid.exclusive-binding:True This option isn't yet exposed over AMQP 1.0 > qpid.ive:False This works for me on trunk. It's an exchange property, so would obviously only work if the node is an exchange. Perhaps there is a difference between latest 3.0 candidate code and trunk however. (Or perhaps I am misunderstanding the test case?) > qpid.file_count:10 > qpid.file_size:10000 These really should be asserted on, but at present it is the journal module, not the broker, that recognises them. Special support could be added however. > qpid.msg_sequence:False > qpid.msg_sequence:True This was an old async replication related property, the new functionality is offered through the qpid.queue_msg_sequence option. > qpid.optimistic_consume:False > qpid.optimistic_consume:True > qpid.persist_last_node:False > qpid.persist_last_node:True > qpid.queue_event_generation:10 The optimistic_consume, persist_last_node and queue_event_generation options don't exist any more. > qpid.sequence_counter:10 ## this could be failing due to Bug 1040526 That is not really an option, it's queue state and not something I think should necessarily readable and assertable on here. > x-qpid-capacity:10 > x-qpid-flow-resume-capacity:5 > x-qpid-maximum-message-age:10 None of these are actually supported options. All scenarios described in above comments are tested,also asserts on amqp1.0 capabilities are tested. All tested scenarios pass (if the feature itself is implemented flawlessly) except qpid.file_count:10 qpid.file_size:10000 . This will be tracked as a separate bug. verified on qpid-0.22-47 |