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>
@Override
public void onSuccess(List<String> result) {
//old client still active
- LOG.info("Echo testing of old client {} succeded", oldClient.getConnectionInfo());
+ LOG.info("Echo testing of old client {} succeeded", oldClient.getConnectionInfo());
}
@Override
public void onFailure(Throwable throwable) {
- LOG.info("Echo testing of old client {} failed", oldClient.getConnectionInfo());
+ LOG.info("Echo testing of old client {} failed, disconnect and notify clients",
+ oldClient.getConnectionInfo());
+ //disconnect the old client to cleanup, so that new connection can proceed
+ oldClient.disconnect();
onInactiveClient(oldClient);
}
}, MoreExecutors.directExecutor());