@@ -1024,7 +1024,7 @@ open_db(struct server_config *server_config,
server_uuid = ovsdb_jsonrpc_server_get_uuid(server_config->jsonrpc);
replication_set_db(db->db, conf->source, conf->ab.sync_exclude,
- server_uuid, conf->options->rpc.probe_interval);
+ server_uuid, &conf->options->rpc);
}
return NULL;
}
@@ -1731,8 +1731,7 @@ ovsdb_server_connect_active_ovsdb_server(struct unixctl_conn *conn,
if (conf->model == SM_ACTIVE_BACKUP && !conf->ab.backup) {
replication_set_db(db->db, conf->source, conf->ab.sync_exclude,
- server_uuid,
- conf->options->rpc.probe_interval);
+ server_uuid, &conf->options->rpc);
conf->ab.backup = true;
}
}
@@ -1801,8 +1800,7 @@ ovsdb_server_set_active_ovsdb_server_probe_interval(struct unixctl_conn *conn,
conf->options->rpc.probe_interval = probe_interval;
if (conf->ab.backup) {
replication_set_db(db->db, conf->source, conf->ab.sync_exclude,
- server_uuid,
- conf->options->rpc.probe_interval);
+ server_uuid, &conf->options->rpc);
}
}
}
@@ -1881,8 +1879,7 @@ ovsdb_server_set_sync_exclude_tables(struct unixctl_conn *conn,
conf->ab.sync_exclude = xstrdup(argv[1]);
if (conf->ab.backup) {
replication_set_db(db->db, conf->source, conf->ab.sync_exclude,
- server_uuid,
- conf->options->rpc.probe_interval);
+ server_uuid, &conf->options->rpc);
}
}
}
@@ -108,7 +108,7 @@ static bool request_id_compare_and_free(struct replication_db *,
void
replication_set_db(struct ovsdb *db, const char *sync_from,
const char *exclude_tables, const struct uuid *server,
- int probe_interval)
+ const struct jsonrpc_session_options *options)
{
struct replication_db *rdb = find_db(db->name);
@@ -124,7 +124,7 @@ replication_set_db(struct ovsdb *db, const char *sync_from,
if (rdb
&& nullable_string_is_equal(rdb->excluded_tables_str, exclude_tables)
&& nullable_string_is_equal(rdb->sync_from, sync_from)) {
- jsonrpc_session_set_probe_interval(rdb->session, probe_interval);
+ jsonrpc_session_set_options(rdb->session, options);
return;
}
@@ -147,7 +147,7 @@ replication_set_db(struct ovsdb *db, const char *sync_from,
rdb->session = jsonrpc_session_open(rdb->sync_from, true);
rdb->session_seqno = UINT_MAX;
- jsonrpc_session_set_probe_interval(rdb->session, probe_interval);
+ jsonrpc_session_set_options(rdb->session, options);
rdb->state = RPL_S_INIT;
rdb->db->read_only = true;
@@ -20,6 +20,7 @@
#include <stdbool.h>
struct ovsdb;
+struct jsonrpc_session_options;
/* Replication module runs when OVSDB server runs in the backup mode.
*
@@ -47,7 +48,7 @@ struct ovsdb;
void replication_set_db(struct ovsdb *, const char *sync_from,
const char *exclude_tables, const struct uuid *server,
- int probe_interval);
+ const struct jsonrpc_session_options *);
void replication_remove_db(const struct ovsdb *);
void replication_run(void);
Set all the options for the source connection, not only the inactivity probe interval. Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- ovsdb/ovsdb-server.c | 11 ++++------- ovsdb/replication.c | 6 +++--- ovsdb/replication.h | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-)