Xmpp client state machine needs better back off logic

Bug #1488636 reported by Nischal Sheth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.0
Fix Committed
Wishlist
Nischal Sheth
R2.20
Fix Released
Wishlist
Nischal Sheth
Trunk
Fix Committed
Wishlist
Nischal Sheth

Bug Description

The xmpp client state machine has back off logic to increase the connect
timer if the connection attempt fails. However it doesn't handle the case
where the server closes the connection after establishment very well. The
number of attempts is reset to 0 as soon as the xmpp state machine goes
to established state. As a result, the client keeps connecting to server
very aggressively if the server closes the connection after established
state has been reached.

Fix is to reset the counter after a few keepalives have been received.

Tags: xmpp
Nischal Sheth (nsheth)
description: updated
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/13367
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/13381
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.0

Review in progress for https://review.opencontrail.org/13383
Submitter: Nischal Sheth (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/13381
Committed: http://github.org/Juniper/contrail-controller/commit/3fcb630f60f39992a6ef7d6708abf56048c6ad63
Submitter: Zuul
Branch: master

commit 3fcb630f60f39992a6ef7d6708abf56048c6ad63
Author: Nischal Sheth <email address hidden>
Date: Wed Aug 26 17:26:35 2015 -0700

Improve connection backoff logic in xmpp client

Do not reset the connection attempts counter immediately on reaching
Established state. Do it only after 3 keepalives have been received.

This ensures that the client backs off it's connection attempts even
for cases where the state machine goes to Established, but then goes
down right away. For example, when the server closes the connection
because some higher level requirement is not satisfied.

Change-Id: Ie6d68c1bef910faf3b7b6adc7a236127ffc9a0ea
Closes-Bug: 1488636
Related-Bug: 1488278

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/13383
Committed: http://github.org/Juniper/contrail-controller/commit/c68a7b81da8a0856546375036799726acf114b16
Submitter: Zuul
Branch: R2.0

commit c68a7b81da8a0856546375036799726acf114b16
Author: Nischal Sheth <email address hidden>
Date: Wed Aug 26 17:26:35 2015 -0700

Improve connection backoff logic in xmpp client

Do not reset the connection attempts counter immediately on reaching
Established state. Do it only after 3 keepalives have been received.

This ensures that the client backs off it's connection attempts even
for cases where the state machine goes to Established, but then goes
down right away. For example, when the server closes the connection
because some higher level requirement is not satisfied.

Change-Id: Ie6d68c1bef910faf3b7b6adc7a236127ffc9a0ea
Closes-Bug: 1488636

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/13367
Committed: http://github.org/Juniper/contrail-controller/commit/1cf76cd614379eedf9fdb39a9ce8772b60845ed0
Submitter: Zuul
Branch: R2.20

commit 1cf76cd614379eedf9fdb39a9ce8772b60845ed0
Author: Nischal Sheth <email address hidden>
Date: Wed Aug 26 17:26:35 2015 -0700

Improve connection backoff logic in xmpp client

Do not reset the connection attempts counter immediately on reaching
Established state. Do it only after 3 keepalives have been received.

This ensures that the client backs off it's connection attempts even
for cases where the state machine goes to Established, but then goes
down right away. For example, when the server closes the connection
because some higher level requirement is not satisfied.

Change-Id: Ie6d68c1bef910faf3b7b6adc7a236127ffc9a0ea
Closes-Bug: 1488636
Related-Bug: 1488278

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22-dev

Review in progress for https://review.opencontrail.org/13927
Submitter: Vinay Vithal Mahuli (<email address hidden>)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.