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

Bug 888435

Summary: HA backup broker shuts down after redeclaring exchange
Product: Red Hat Enterprise MRG Reporter: Jason Dillaman <jdillama>
Component: qpid-cppAssignee: Alan Conway <aconway>
Status: CLOSED CURRENTRELEASE QA Contact: mick <mgoulish>
Severity: medium Docs Contact:
Priority: high    
Version: DevelopmentCC: esammons, freznice, iboverma, jross, mgoulish, mtoth
Target Milestone: 3.0Keywords: OtherQA
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 955752 (view as bug list) Environment:
Last Closed: 2015-01-21 12:56:08 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: 698367, 955752    
Attachments:
Description Flags
Patch to add a unit test reproducer
none
standalone reproducer none

Description Jason Dillaman 2012-12-18 17:22:31 UTC
Description of problem:
Re-declaring an exchange on a primary broker results in a exchange declare event being sent to the backup.  Upon receipt of the exchange declare event, the backup broker will delete the existing exchange and re-declare it.  If the exchange was being used as an alternate exchange, the delete will be prohibited which results in the backup broker shutting down.

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

How reproducible:
100%

Steps to Reproduce:
1. Start a primary and backup broker
2. Declare an exchange and ensure it is used as an alternate
3. Re-declare the exchange
  
Actual results:
The backup broker shuts down 

Expected results:
Re-declaring an existing exchange should be a no-op in the backup

Additional info:

Comment 1 Jason Dillaman 2012-12-18 17:24:04 UTC
Created attachment 665644 [details]
Patch to add a unit test reproducer

Comment 2 Alan Conway 2013-02-07 20:55:05 UTC
The reproducer passes on the current 0.18-mrg branch, commit 72bda26.
Is this bug still an issue?

Comment 3 Jason Dillaman 2013-02-07 23:59:14 UTC
It might be a week or two before I get a chance to test this.  Looking at ExchangeRegistry, it seems like the issue is still present since it will throw an exchange declared event even when an exchange was not declared.  It also looks like BrokerRegistry will delete any existing exchange when it receives the duplicitous exchange declare event.  Maybe the reproducer no longer works after bz886656 was fixed.   I think you might need to remove line 864 from the patch -- which was added as a workaround for the alt-exchange counting bug.

Comment 4 Alan Conway 2013-02-08 15:25:24 UTC
After removing line 864 I do indeed see the failure. I'll look into it.

Comment 8 mick 2013-11-21 21:00:23 UTC
Created attachment 827435 [details]
standalone reproducer

Comment 9 mick 2013-11-21 21:03:09 UTC
VERIFIED

Can't get unit test to work on installed packages.

I used a C program to redeclare same queue multiple times to HA 3-cluster, then make a bunch of queues and bind them to it, then use qpid-tool to list exchanges and see that nothing weird happened.   ( And verify that all 3 brokers are still running cheerfully. )

see my attachment -- it has C program, HA cluster start script, and README.