Skip to content

Commit

Permalink
jsonrpc-server: Re-add remotes on role changes.
Browse files Browse the repository at this point in the history
It is currently not possible for the role to change in runtime
(unless a manual DB transaction is crafted), but it will be with
addition of a config file.

If the role changes, listening socket will be closed, and all
the connections to this remote will be terminated.

Signed-off-by: Ilya Maximets <[email protected]>
Signed-off-by: 0-day Robot <[email protected]>
  • Loading branch information
igsilya authored and ovsrobot committed Dec 14, 2023
1 parent 8c868bf commit 431fbb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ovsdb/jsonrpc-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ ovsdb_jsonrpc_server_set_remotes(struct ovsdb_jsonrpc_server *svr,
if (!options) {
VLOG_INFO("%s: remote deconfigured", node->name);
ovsdb_jsonrpc_server_del_remote(node);
} else if (options->dscp != remote->dscp) {
} else if (options->dscp != remote->dscp
|| !nullable_string_is_equal(options->role, remote->role)) {
ovsdb_jsonrpc_server_del_remote(node);
}
}
Expand Down

0 comments on commit 431fbb2

Please sign in to comment.