Bug 1324845 - Federation does not interoperate between MRG-M 2 and 3
Summary: Federation does not interoperate between MRG-M 2 and 3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 3.2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: 3.2.2
: ---
Assignee: Alan Conway
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-07 12:45 UTC by Mike Cressman
Modified: 2016-10-11 07:36 UTC (History)
5 users (show)

Fixed In Version: qpid-cpp-0.34-10
Doc Type: Bug Fix
Doc Text:
Cause: management method link.bridge got extra 'credit' argument between MRG 2 and 3. Consequence: MRG2 tools cannot add links to MRG3 broker Fix: Remove the credit argument in next MRG3 release In MRG3 the link.bridge method is already deprecated in favor of broker.create which supports the credit argument so new MRG3-based code should not need to use link.bridge. Result: Can use MRG2 and MRG3 tools with a MRG3 broker.
Clone Of:
Environment:
Last Closed: 2016-10-11 07:36:23 UTC
Target Upstream Version:
tkratky: needinfo-


Attachments (Terms of Use)
Script to test all the combinations of MRG2, MRG3 and MRG3+ for interop. (3.13 KB, text/plain)
2016-04-14 15:25 UTC, Alan Conway
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2049 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.2.2 Bug Fix Release 2016-10-11 11:36:01 UTC
Red Hat Bugzilla 1120081 None None None Never

Internal Links: 1120081

Description Mike Cressman 2016-04-07 12:45:48 UTC
Description of problem:
There is a need in the field for a MRG 2.x broker to set up federation to a MRG 3 broker.  This fails due to schema changes in MRG 3 (see QPID-4728 upstream).

BZ 1120081 has the original discussion regarding fixing this incompatibililty.  At the time, it was decided to leave the change and document the one-way problem (can't initiate from MRG 2)


Version-Release number of selected component (if applicable):
qpid-cpp-0.34-*, qpid-tools-0.34-*
qpid-cpp-0.18-*, qpid-tools-0.18-*


How reproducible:
100%, see https://bugzilla.redhat.com/show_bug.cgi?id=1120081#c0


Actual results:
Cannot set up federation in both directions.

Expected results:
Able to set up federation in both directions between MRG-M 2 and 3

Additional info:
Customer cannot update the MRG 2 side, so solution must involve only MRG 3 changes.

Comment 1 Alan Conway 2016-04-11 21:24:55 UTC
Which version of MRG2 are they stuck at?

Comment 2 Alan Conway 2016-04-12 20:15:03 UTC
According to code comments, the link.bridge method has already been deprecated in favour of the broker.create() method which is more flexible. If MRG 3 users have moved away from the bridge method that may help ease the pain, but I don't know how clearly deprecated it was - our own tools still use it.

Comment 3 Alan Conway 2016-04-14 15:18:57 UTC
Fix pushed:

http://git.app.eng.bos.redhat.com/git/rh-qpid.git/commit/?h=0.34-mrg-aconway-bz1324845

MRG3+ and MRG2 are all good in both directions but there is an interop problem between MRG3 and MRG3+. I don't see how to avoid it. 

====
Bug 1324845 - Federation does not interoperate between MRG-M 2 and 30.34-mrg-aconway-bz1324845

An extra 'credit' argument was added to the link.bridge() management operation
in MRG3, which means the MRG2 qpid-route tool cannot add routes to a MRG3
broker.

The link.bridge() operation was deprecated in MRG2 in favour of
broker.create("bridge"...) but was still in use by the qpid-route tool.

This patch (I'll call it MRG3+ for clarity)
- Removes 'credit' argument from link.bridge()
- Modifies qpid-route to use broker.create()

The interop result:

- MRG2 qpid-route
  - MRG2 broker: ok, no credit.
  - MRG3 broker: FAILS, the reason for this fix.
  - MRG3+ broker: ok, no credit set (default unlimited)

- MRG3 qpid-route
  - MRG2 broker: ok, credit ignored.
  - MRG3 broker: ok, credit set.
  - MRG3+: route created but credit IGNORED, default unlimited.

- MRG3+ qpid-route
  - MRG2 broker: ok, credit is ignored.
  - MRG3/MRG3+ broker: ok, credit is set.

The new problem is MRG3 qpid-route -> MRG3+ broker. The route is created
but the credit setting is ignored without warning.

Comment 4 Alan Conway 2016-04-14 15:25:22 UTC
Created attachment 1147278 [details]
Script to test all the combinations of MRG2, MRG3 and MRG3+ for interop.

Not an automated test but prints a readable summary of running all qpid-route versions against all qpidd versions so you can verify the expected behavior.

Note that credit=0 and credit=4294967295 both mean the same thing - unlimited credit.

Comment 6 Pavel Moravec 2016-07-31 14:07:17 UTC
Reproducer for QE:

0) Theory about broker federation:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/3/html-single/Messaging_Installation_and_Configuration_Guide/index.html#chap-Broker_Federation


1) have 2 machines:
- 1st with some MRG3
- 2nd with MRG2 (get packages from download.eng.bos.redhat.com/brewroot/////packages/qpid-cpp/0.18 resp. relevant subdir)


2) start both brokers


3) create some provisioning and then test routes/federations from mrg2 to mrg3:

# run all on mrg3:

qpid-config add queue q

# test exchange route from mrg2 to mrg3 - qpid-receive should print a message
qpid-config bind amq.fanout q
qpid-route route add mrg3 mrg2 amq.fanout
qpid-send -b mrg2 -a amq.fanout -m1
qpid-receive -a q -b mrg3 -m1
qpid-route route del mrg3 mrg2 amq.fanout
qpid-config unbind amq.fanout q

# test queue route from mrg2 to mrg3 - qpid-receive should print a message
qpid-route queue add mrg3 mrg2 amq.fanout q
qpid-send -b mrg2 -a amq.fanout -m1
qpid-receive -a q -m1
qpid-route queue del mrg3 mrg2 amq.fanout q


4) create some provisioning and then test routes/federations from mrg3 to mrg2:

# run all on mrg2:

qpid-config add queue q

# test exchange route from mrg3 to mrg2 - qpid-receive should print a message
qpid-config bind amq.fanout q
qpid-route route add mrg2 mrg3 amq.fanout
qpid-send -b mrg3 -a amq.fanout -m1
qpid-receive -a q -b mrg2 -m1
qpid-route route del mrg2 mrg3 amq.fanout
qpid-config unbind amq.fanout q

# test queue route from mrg3 to mrg2 - qpid-receive should print a message
qpid-route queue add mrg2 mrg3 amq.fanout q 
qpid-send -b mrg3 -a amq.fanout -m1
qpid-receive -a q -m1
qpid-route queue del mrg2 mrg3 amq.fanout q

Comment 13 Alan Conway 2016-08-24 12:47:14 UTC
I tried the reproducer from comment 6 but it seems to have some errors - the unbind at the end of the route test means that q doesn't get any message in the queue route. This modified version works for me, I gave the queues different names just to avoid confusion:

# run all on mrg3:

qpid-config -b $mrg3 add queue q

echo test exchange route from mrg2 to mrg3 - qpid-receive should print TEST
qpid-config -b $mrg3 bind amq.fanout q
qpid-route route add $mrg3 $mrg2 amq.fanout q
qpid-send -b $mrg2 -a amq.fanout -m1 --content-string TEST
qpid-receive -b $mrg3 -a q -m1
qpid-route  route del $mrg3 $mrg2 amq.fanout q
#ERROR: unbinding q here means it won't receive messages from the queue route below.
#qpid-config -b $mrg3 unbind amq.fanout q

echo test queue route from mrg2 to mrg3 - qpid-receive should print TEST
qpid-config -b $mrg2 add queue q2 # Missing creation of queue on mrg2 for queue route source.
qpid-route queue add $mrg3 $mrg2 amq.fanout q2
qpid-send -b $mrg2 -a q2 -m1 --content-string TEST
qpid-receive -b $mrg3 -a q -m1
qpid-route  queue del $mrg3 $mrg2 amq.fanout q2


# run all on mrg2:

qpid-config -b $mrg2 add queue qq

echo test exchange route from mrg3 to mrg2 - qpid-receive should print TEST
qpid-config -b $mrg2 bind amq.fanout qq
qpid-route route add $mrg2 $mrg3 amq.fanout qq
qpid-send -b $mrg3 -a amq.fanout -m1 --content-string TEST
qpid-receive -b $mrg2 -a qq -m1
qpid-route  route del $mrg2 $mrg3 amq.fanout qq
#ERROR: unbinding qq here means it won't receive messages from the queue route below.
#qpid-config -b $mrg2 unbind amq.fanout qq

echo test queue route from mrg3 to mrg2 - qpid-receive should print TEST
qpid-config -b $mrg3 add queue qq2 # Missing creation of queue on mrg3 for queue route source.
qpid-route queue add $mrg2 $mrg3 amq.fanout qq2
qpid-send -b $mrg3 -a qq2 -m1 --content-string TEST
qpid-receive -b $mrg2 -a qq -m1
qpid-route  queue del $mrg2 $mrg3 amq.fanout qq2

Comment 17 errata-xmlrpc 2016-10-11 07:36:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2049.html


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