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,
but it will be with addition of a config file.

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

Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Dec 13, 2023
1 parent bb0e66d commit 5dfc46d
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 5dfc46d

Please sign in to comment.