summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ovn/controller/bindings.c14
-rw-r--r--ovn/controller/chassis.c10
-rw-r--r--ovn/controller/ovn-controller.c4
-rw-r--r--ovn/controller/ovn-controller.h2
4 files changed, 15 insertions, 15 deletions
diff --git a/ovn/controller/bindings.c b/ovn/controller/bindings.c
index dc1da5a92..ef233c01b 100644
--- a/ovn/controller/bindings.c
+++ b/ovn/controller/bindings.c
@@ -86,20 +86,20 @@ bindings_run(struct controller_ctx *ctx)
txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
ovsdb_idl_txn_add_comment(txn,
"ovn-controller: updating bindings for '%s'",
- ctx->chassis_name);
+ ctx->chassis_id);
SBREC_BINDINGS_FOR_EACH(bindings_rec, ctx->ovnsb_idl) {
if (sset_find_and_delete(&lports, bindings_rec->logical_port)) {
- if (!strcmp(bindings_rec->chassis, ctx->chassis_name)) {
+ if (!strcmp(bindings_rec->chassis, ctx->chassis_id)) {
continue;
}
if (bindings_rec->chassis[0]) {
VLOG_INFO("Changing chassis for lport %s from %s to %s",
bindings_rec->logical_port, bindings_rec->chassis,
- ctx->chassis_name);
+ ctx->chassis_id);
}
- sbrec_bindings_set_chassis(bindings_rec, ctx->chassis_name);
- } else if (!strcmp(bindings_rec->chassis, ctx->chassis_name)) {
+ sbrec_bindings_set_chassis(bindings_rec, ctx->chassis_id);
+ } else if (!strcmp(bindings_rec->chassis, ctx->chassis_id)) {
sbrec_bindings_set_chassis(bindings_rec, "");
}
}
@@ -132,10 +132,10 @@ bindings_destroy(struct controller_ctx *ctx)
txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
ovsdb_idl_txn_add_comment(txn,
"ovn-controller: removing all bindings for '%s'",
- ctx->chassis_name);
+ ctx->chassis_id);
SBREC_BINDINGS_FOR_EACH(bindings_rec, ctx->ovnsb_idl) {
- if (!strcmp(bindings_rec->chassis, ctx->chassis_name)) {
+ if (!strcmp(bindings_rec->chassis, ctx->chassis_id)) {
sbrec_bindings_set_chassis(bindings_rec, "");
}
}
diff --git a/ovn/controller/chassis.c b/ovn/controller/chassis.c
index 768b8121f..37287c1ea 100644
--- a/ovn/controller/chassis.c
+++ b/ovn/controller/chassis.c
@@ -44,11 +44,11 @@ register_chassis(struct controller_ctx *ctx,
txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
ovsdb_idl_txn_add_comment(txn,
"ovn-controller: registering chassis '%s'",
- ctx->chassis_name);
+ ctx->chassis_id);
if (!chassis_rec) {
chassis_rec = sbrec_chassis_insert(txn);
- sbrec_chassis_set_name(chassis_rec, ctx->chassis_name);
+ sbrec_chassis_set_name(chassis_rec, ctx->chassis_id);
}
encap_rec = sbrec_encap_insert(txn);
@@ -76,7 +76,7 @@ chassis_run(struct controller_ctx *ctx)
static bool inited = false;
SBREC_CHASSIS_FOR_EACH(chassis_rec, ctx->ovnsb_idl) {
- if (!strcmp(chassis_rec->name, ctx->chassis_name)) {
+ if (!strcmp(chassis_rec->name, ctx->chassis_id)) {
break;
}
}
@@ -132,7 +132,7 @@ chassis_destroy(struct controller_ctx *ctx)
struct ovsdb_idl_txn *txn;
SBREC_CHASSIS_FOR_EACH(chassis_rec, ctx->ovnsb_idl) {
- if (!strcmp(chassis_rec->name, ctx->chassis_name)) {
+ if (!strcmp(chassis_rec->name, ctx->chassis_id)) {
break;
}
}
@@ -144,7 +144,7 @@ chassis_destroy(struct controller_ctx *ctx)
txn = ovsdb_idl_txn_create(ctx->ovnsb_idl);
ovsdb_idl_txn_add_comment(txn,
"ovn-controller: unregistering chassis '%s'",
- ctx->chassis_name);
+ ctx->chassis_id);
sbrec_chassis_delete(chassis_rec);
retval = ovsdb_idl_txn_commit_block(txn);
diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c
index 60ae35a2e..477ad0a1f 100644
--- a/ovn/controller/ovn-controller.c
+++ b/ovn/controller/ovn-controller.c
@@ -131,7 +131,7 @@ get_core_config(struct controller_ctx *ctx)
}
ovnsb_remote = xstrdup(remote);
- ctx->chassis_name = xstrdup(system_id);
+ ctx->chassis_id = xstrdup(system_id);
return;
try_again:
@@ -145,7 +145,7 @@ int
main(int argc, char *argv[])
{
struct unixctl_server *unixctl;
- struct controller_ctx ctx = { .chassis_name = NULL };
+ struct controller_ctx ctx = { .chassis_id = NULL };
bool exiting;
int retval;
diff --git a/ovn/controller/ovn-controller.h b/ovn/controller/ovn-controller.h
index e22c2655c..9d2fb3928 100644
--- a/ovn/controller/ovn-controller.h
+++ b/ovn/controller/ovn-controller.h
@@ -18,7 +18,7 @@
#define OVN_CONTROLLER_H 1
struct controller_ctx {
- char *chassis_name; /* Name for this chassis. */
+ char *chassis_id; /* ID for this chassis. */
const char *br_int_name; /* Name of local integration bridge. */
struct ovsdb_idl *ovnsb_idl;
struct ovsdb_idl *ovs_idl;