mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
jsonrpc: Disable inactivity probes if replay engine is active.
Current version of replay engine doesn't handle time-based internal events that results in stream send/receive. Disabling jsonrpc inactivity probes for now to not block process waiting for probe being sent. The proper solution would be to implement correct record/replay of time, probably, by recording time and using the time warping. Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Acked-by: Dumitru Ceara <dceara@redhat.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "openvswitch/json.h"
|
||||
#include "openvswitch/list.h"
|
||||
#include "openvswitch/ofpbuf.h"
|
||||
#include "ovs-replay.h"
|
||||
#include "ovs-thread.h"
|
||||
#include "openvswitch/poll-loop.h"
|
||||
#include "reconnect.h"
|
||||
@@ -888,7 +889,7 @@ jsonrpc_session_open_multiple(const struct svec *remotes, bool retry)
|
||||
reconnect_set_backoff(s->reconnect, INT_MAX, INT_MAX);
|
||||
}
|
||||
|
||||
if (!stream_or_pstream_needs_probes(name)) {
|
||||
if (!stream_or_pstream_needs_probes(name) || ovs_replay_is_active()) {
|
||||
reconnect_set_probe_interval(s->reconnect, 0);
|
||||
}
|
||||
|
||||
@@ -914,6 +915,11 @@ jsonrpc_session_open_unreliably(struct jsonrpc *jsonrpc, uint8_t dscp)
|
||||
reconnect_set_name(s->reconnect, jsonrpc_get_name(jsonrpc));
|
||||
reconnect_set_max_tries(s->reconnect, 0);
|
||||
reconnect_connected(s->reconnect, time_msec());
|
||||
|
||||
if (ovs_replay_is_active()) {
|
||||
reconnect_set_probe_interval(s->reconnect, 0);
|
||||
}
|
||||
|
||||
s->dscp = dscp;
|
||||
s->rpc = jsonrpc;
|
||||
s->stream = NULL;
|
||||
@@ -1279,6 +1285,9 @@ void
|
||||
jsonrpc_session_set_probe_interval(struct jsonrpc_session *s,
|
||||
int probe_interval)
|
||||
{
|
||||
if (ovs_replay_is_active()) {
|
||||
return;
|
||||
}
|
||||
reconnect_set_probe_interval(s->reconnect, probe_interval);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user