Comment 10 for bug 1682080

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/31218
Committed: http://github.com/Juniper/contrail-controller/commit/f10f57e5c30ac3156e4c7952554829b084a162e3
Submitter: Zuul (<email address hidden>)
Branch: master

commit f10f57e5c30ac3156e4c7952554829b084a162e3
Author: Manish <email address hidden>
Date: Tue May 9 14:34:55 2017 +0530

SIGHUP on agent makes its CN connectin unstable

Analysis (courtesy nipak):
The issue happens as we make-before-break I.e establish new Xmpp connections,
while a background task does the cleanup of routes etc., for the older
connections.

We apply changes only if the new set is different.

With the following config applied b2b with SIGHUP,
(Server-A, Server-B)
(Server-C, Server-D)
(Server-A, Server-E, Server-D)

While connection to server-A(older incarnation) is in the process of cleaning
up, agent will apply new config(server-A) and try a new connection towards
server-A.

Control-node sends TcpClose on both the new and old connections.
Agent tries to connect endlessly.

Solution:
On deleted channels, do unregister from xmpp as soon as it is moved out of
agent channel list. This ensures that old connection is cleaned up before new
one is tried. Also old channel remains in deleted list till some new channel
becomes stable.

Change-Id: I7305432f8ddc093fdcf5a7945b0ad70aa64caa67
Closes-bug: #1682080