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

Bug 601895

Summary: qpid-tool uses QMFv1 format for method calls regardless of the version of the agent
Product: Red Hat Enterprise MRG Reporter: Ted Ross <tross>
Component: qpid-qmfAssignee: Ken Giusti <kgiusti>
Status: CLOSED ERRATA QA Contact: Frantisek Reznicek <freznice>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: esammons, freznice, gsim, tross
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-20 11:30:02 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:
Bug Depends On:    
Bug Blocks: 583526, 601841    
Attachments:
Description Flags
Suggested fix
none
revised patch none

Description Ted Ross 2010-06-08 20:21:47 UTC
Description of problem:

The "call" command in qpid-tool causes methods to be invoked via QMFv1 on the broker even though the broker can handle QMFv2 methods.

This can be seen when trying to invoke a method on a cluster.  The response code will indicate that the call is rejected because clustered brokers do not permit QMFv1 method calls.

Version-Release number of selected component (if applicable):

1.3 beta2

How reproducible:

seemingly 100%

Steps to Reproduce:
1. start a 2-node cluster
2. run qpid-tool
3. find the ID of a queue using "list queue"
4. invoke the purge method using "call <ID> purge 0"
  
Actual results:

Error: QMFv1 methods not allowed on a cluster

Expected results:

Success

Comment 1 Gordon Sim 2010-07-05 14:02:18 UTC
Created attachment 429542 [details]
Suggested fix

The issue here is that all unsolicited messages on which qpid-tool operates come via the QMF v1 path, even though the broker agent is recognised as a v2 agent. The method used to call management methods uses the object id of the object in question to determine which form of method to use.

This patch forges a v2 object-id and passes that through in place of the v1 id. It does this only if the agent for the object is a v2 agent.

Comment 2 Ted Ross 2010-07-07 12:29:12 UTC
The patch looks ok.  It emulates the object-name generation algorithm used in the broker's embedded agent.

I'll note that this is a broker-specific fix which is ok because the broker is the only agent that will act as a V2 agent yet publish objects updates in V1 form.

Comment 3 Gordon Sim 2010-07-09 12:55:11 UTC
Created attachment 430668 [details]
revised patch

A minor revision to the patch that uses the newly added ObjectId.create() classmethod.

Comment 4 Ken Giusti 2010-07-09 13:57:35 UTC
Submitted Gordon's patch upstream:
Committed revision 962526.

Comment 6 Frantisek Reznicek 2010-08-05 14:41:54 UTC
The issue has been fixed (python qmf console/client as well as qpid-tool is able to purge in standalone / clustered environment), tested on RHEL 4.8 / 5.5 i386 / x86_64 on packages:
python-qmf-0.7.946106-8.el5
python-qpid-0.7.946106-11.el5
qmf-0.7.946106-11.el5
qmf-devel-0.7.946106-11.el5
qpid-cpp-client*-0.7.946106-11.el5
qpid-cpp-mrg-debuginfo-0.7.946106-11.el5
qpid-cpp-server*-0.7.946106-11.el5
qpid-java-client-0.7.946106-7.el5
qpid-java-common-0.7.946106-7.el5
qpid-tools-0.7.946106-8.el5
rh-qpid-cpp-tests-0.7.946106-11.el5
ruby-qmf-0.7.946106-11.el5
ruby-qpid-0.7.946106-2.el5

-> VERIFIED