Close old OVSDB connection when ping fails 30/75430/4
authorVictor Pickard <vpickard@redhat.com>
Thu, 23 Aug 2018 17:09:13 +0000 (13:09 -0400)
committerVictor Pickard <vpickard@redhat.com>
Tue, 16 Oct 2018 14:50:08 +0000 (14:50 +0000)
commit9ef9be3aca32e4c202d667b9b7303975163a8303
tree4f3addc05941201ee2c3acdb8b9bd7f76acf45f7
parent3577574657d07d95c2656b6f3f04c107d7698949
Close old OVSDB connection when ping fails

When rebooting a compute node, the ovsdb hostconfig is missing
from oper d/s.

The change resolves the issue, by closing the connection if
the ping/echo fails. The ping/echo is triggered when a new
connection comes in.

What was happening before this change, is that the new
connection from the rebooted compute node would be rejected
and closed, because the code saw an existing connection, and
had not yet "closed" the old connection, which would fail later,
about 3 seconds later.

Tested this with queens/oxygen by manually rebooting compute node
(sudo shutdown -r now) a number of times.

Many more details in the JIRA.

JIRA: OVSDB-444

Change-Id: I0c7e53b032fd53d0287bc28ae86f7ebda06cfabe
Signed-off-by: Victor Pickard <vpickard@redhat.com>
library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/StalePassiveConnectionService.java