Bug 1373146

Summary: Neutron-server refuses to start with "PreconditionFailed: Exchange.declare: (406) PRECONDITION_FAILED - cannot redeclare exchange"
Product: Red Hat OpenStack Reporter: Pablo Iranzo Gómez <pablo.iranzo>
Component: python-oslo-messagingAssignee: John Eckersberg <jeckersb>
Status: CLOSED NOTABUG QA Contact: Ofer Blaut <oblaut>
Severity: high Docs Contact:
Priority: high    
Version: 7.0 (Kilo)CC: amuller, apevec, chrisw, fdinitto, fpercoco, ihrachys, jeckersb, lhh, nyechiel, pcaruana, srevivo, vstinner
Target Milestone: asyncKeywords: ZStream
Target Release: 7.0 (Kilo)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-07 09:23:00 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:

Description Pablo Iranzo Gómez 2016-09-05 10:52:32 UTC
Description of problem:

After controllers were restarted (even with latest packages as of today), some errors are listed on pcs status and on the logs:

/var/log/neutron/openvswitch-agent.log:2016-09-05 10:10:19.456 19131 TRACE neutron PreconditionFailed: Exchange.declare: (406) PRECONDITION_FAILED - cannot redeclare exchange 'q-agent-notifier-port-update_fanout' in vhost '/' with different type, durable, internal or autodelete value


Same error has been seen on scheduler-fanout and q-l3-plugin.

Comment 18 Pablo Caruana 2016-09-07 09:23:48 UTC
Problem is solved. 

Finally  the problem was introduced  manually as  modified a shared python library to avoid a 'deprecated' warning in the controllers  while debugging some other problem with cinder. The side effect for the rest of the platform was that the exchanges were created with AutoDelete flag set to False even if the routine was called with the argument set to True.

$ diff /usr/lib/python2.7/site-packages/amqp/channel.py /usr/lib/python2.7/site-packages/amqp/channel.py.FILE_MODIFIED
<         args.write_bit(auto_delete)
---
>         args.write_bit(False)  # internal: deprecated


Additionally detection, consider modifying /etc/sos.conf to enable:

rpm.rpmva = on

For running the rpm -va and detecting this kind of situations.

Closing this bugzilla.