Bug 796184

Summary: Wrong commands in Configuring Queue Replication section
Product: Red Hat Enterprise MRG Reporter: Pavel Moravec <pmoravec>
Component: Messaging_Installation_and_Configuration_GuideAssignee: Joshua Wulf <jwulf>
Status: CLOSED CURRENTRELEASE QA Contact: Frantisek Reznicek <freznice>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.1CC: chetan, esammons, freznice, iboverma, jskeoch, lcarlon, lzhaldyb, noconnor
Target Milestone: 2.3Keywords: Documentation
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-13 23:59:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pavel Moravec 2012-02-22 12:51:37 UTC
Description of problem:
Section 9.1 of user manual has few wrong commands / settings described:
1) Section 9.1.1, step 3 to create a replicated queue is wrong:
qpid-config --broker-addr src-host add queue my_repl_queue --generate-queue-events 2
- that command performs nothing, as my_repl_queue is already provisioned from qpid config file. Queue name in the command has to be different (i.e. "my_queue" or "my_orig_queue").
- the same change in queue name has to be applied to 9.1.2. step 4

2) Section 9.1.2, step 1 to load module replication_exchange is wrong:
load-module="replication_exchange.so"
- that does not work (path is missing), qpid start fails with 
2012-02-22 12:29:30 critical Unexpected error: "replication_exchange.so".so: cannot open shared object file: No such file or directory: "replication_exchange.so".so (qpid/sys/posix/Shlib.cpp:35)

- it needs to have path (both of below works):
load-module=/usr/lib64/qpid/daemon/replication_exchange
load-module=/usr/lib64/qpid/daemon/replication_exchange.so

3) Section 9.1.2. step 4 to create a replicated queue: same issue like in point 1.

4) Section 9.1.3 has wrong queue name in creating the federation route. The queue needs to correspond to "replication-queue=my_repl_queue" configuration (from 9.1.1 point 1), i.e. in our case it has to be my_repl_queue.

5) Moreover, Section 9.1.3 has redundant parameter "--generate-queue-events 2". Compare the command with https://cwiki.apache.org/qpid/queue-state-replication.html for reference (and command "qpid-config -a host2 add queue queue-a" there).


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


How reproducible:
n.a.


Steps to Reproduce:
1. Read http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/2/html/Messaging_User_Guide/chap-Messaging_User_Guide-Replicated_Queues.html and try to follow.

Comment 1 Joshua Wulf 2012-05-09 14:23:35 UTC
Red_Hat_Enterprise_MRG-Messaging_Installation_and_Configuration_Guide-2.2-web-en-US-0-4.el6eng.src.rpm

http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/2.2/html-single/Messaging_Installation_and_Configuration_Guide/index.html#Section-Configuring_Queue_Replication

Comment 2 John Skeoch 2012-07-10 06:10:13 UTC
Insufficent information to attempt to validate this bug.

The link provided in Comment#1 does not appear to be associated with the guide mentioned in comment#0.

please provide more details as to what has been altered.

Comment 3 Noel OConnor 2012-07-25 11:07:51 UTC
I've hit the same bug as has been listed here.
The Replication Queue chapter of the MRG Messaging User Guide is basically incomplete and useless. http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/2/html/Messaging_User_Guide/chap-Messaging_User_Guide-Replicated_Queues.html

A more accurate and detailed description on how to setup replicated queues is available in the QPID docs http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-CPP-Book/html/queue-state-replication.html

Comment 5 Frantisek Reznicek 2012-11-07 10:07:10 UTC
Some modifications/additions are still necessary:
1] At paragraph beginning:

- It is necessary to omit ', and' at the end of item
- if backup broker has 'Start the backup broker,' source broker should have that as well
- Backup broker should have installed replication listener plugin (replication_listerer.so)
- Source broker should have replication exchange plugin installed (replication_exchange.so)

2] It is necessary to keep terminology
   replication queue / exchange - objects needed for allowing replication (to work) from source broker to backup broker.
   replicated queue[s] - queues which are replicated between source broker to backup broker.

- Add above description and doublecheck that 'replicating' and 'replicated' words are used properly


3] There is necessary to add an example of replication at the end of paragraph as description is quite complicated.
   Take http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-CPP-Book/html/queue-state-replication.html 1.7.1.5 or https://cwiki.apache.org/qpid/queue-state-replication.html Example or at least link to it.



-> ASSIGNED

Comment 6 Frantisek Reznicek 2012-11-07 12:12:32 UTC
4] On more issue on --generate-queue-events
Description given in Table 4.1. Options for qpid-config add queue
may be misleading.

I propose to migrate from 

--generate-queue-events integer
  If set to 1, every enqueue will generate an event that can be processed by registered listeners (e.g. for replication). If set to 2, events will be generated for enqueues dequeues.

to 

--generate-queue-events integer
  If set to 1, every enqueue will generate an event that can be processed by registered listeners (e.g. for replication). If set to 2, events will be generated for both enqueues and dequeues.

Comment 8 Frantisek Reznicek 2012-11-13 09:39:21 UTC
Thanks for the updates.

I'm still seeing following issues:

re 1]

Enable a replication plugin, 
Start the Source Broker, 
Specify a replication event queue when the broker starts, 
Create one or more replicating queues.

should get to

Enable a replication plugin
Start the Source Broker
Specify a replication event queue when the broker starts
Create one or more replicating queues



Ensure that the replication exchange plugin is configured 
Start the backup broker, 
Create a replication exchange, and 
Create a backup queue that corresponds to each replicated queue.

should get to

Ensure that the replication exchange plugin is configured 
Start the backup broker
Create a replication exchange
Create a backup queue that corresponds to each replicated queue


I'm eventually fine with ',' and final '.', but it should be used consistently, moreover ', and' should not be there (still the case).



ad 2], 3], 4] I'm fine with incorporated changes

Another issues:

5] typo
Queue replication is done by creating a message queue called a replication event queue or replication queueon the source broker

 should be

Queue replication is done by creating a message queue called a replication event queue or replication queue on the source broker

6] Procedure 8.3 1.C (each parameter on dedicated line)

replication-queue=my_repl_event_queue create-replication-queue=true

should be

replication-queue=my_repl_event_queue
create-replication-queue=true

7] Example

We should teach our customers to run qpidd as the service, so I propose to change first two steps to:

a] 
qpidd --replication-queue replication-queue --create-replication-queue true --log-enable info+

should be changed to

a1] add following lines to /etc/qpidd.conf
replication-queue=replication-queue
create-replication-queue=true
log-enable=info+
a2] run the broker
service qpidd start


b]
qpidd

should be changed to

service qpidd start





-> ASSIGNED

Comment 10 Frantisek Reznicek 2013-02-08 08:59:23 UTC
I approve the content, points 1] - 7] corrected.

-> VERIFIED

Comment 11 Cheryn Tan 2013-03-13 23:59:58 UTC
Docs published on https://access.redhat.com/knowledge/docs/Red_Hat_Enterprise_MRG/