Skip to content

Commit

Permalink
ovn-controller: if 'ovn-bridge-mappings' unconfigured, return directly.
Browse files Browse the repository at this point in the history
If the chassis doesn't configure the 'external-ids:ovn-bridge-mappings' in
the OVSDB, the 'add_bridge_mappings' should return directly to skip some
unnecessary code.

Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>
Signed-off-by: Russell Bryant <russell@ovn.org>
  • Loading branch information
xpu22 authored and russellb committed Aug 2, 2016
1 parent 3479426 commit c13fb2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ovn/controller/patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ add_bridge_mappings(struct controller_ctx *ctx,
cfg = ovsrec_open_vswitch_first(ctx->ovs_idl);
if (cfg) {
mappings_cfg = smap_get(&cfg->external_ids, "ovn-bridge-mappings");
if (!mappings_cfg) {
mappings_cfg = "";
if (!mappings_cfg || !mappings_cfg[0]) {
return;
}
}

Expand Down

0 comments on commit c13fb2b

Please sign in to comment.