summaryrefslogtreecommitdiff
path: root/ovn/controller
diff options
context:
space:
mode:
authorRussell Bryant <russell@ovn.org>2017-09-01 14:24:12 -0400
committerRussell Bryant <russell@ovn.org>2017-09-06 17:11:55 -0400
commitbd32425ff5385a40f420c6327577a0a088534226 (patch)
treec053167cfbdfded020cad1ac0ec233dc381d503a /ovn/controller
parent574bd10f7a127f93dbdd6b591487a8bf0cbe3f41 (diff)
downloadopenvswitch-bd32425ff5385a40f420c6327577a0a088534226.tar.gz
ovn: Support chassis hostname in requested-chassis.
Previously, OVN expected the Chassis "name" in the "requested-chassis" option for a Logical_Switch_Port. It turns out that in the two OVN integrations I've checked with that plan to use this option, specifying the Chassis "hostname" is much more convenient. This patch extends the "requested-chassis" option to support both the Chassis name or the hostname as a value. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Lance Richardson <lrichard@redhat.com>
Diffstat (limited to 'ovn/controller')
-rw-r--r--ovn/controller/binding.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c
index 6a56e26ca..ca1d43395 100644
--- a/ovn/controller/binding.c
+++ b/ovn/controller/binding.c
@@ -442,8 +442,9 @@ consider_local_datapath(struct controller_ctx *ctx,
if (ctx->ovnsb_idl_txn) {
const char *vif_chassis = smap_get(&binding_rec->options,
"requested-chassis");
- bool can_bind = !vif_chassis || !vif_chassis[0] ||
- !strcmp(vif_chassis, chassis_rec->name);
+ bool can_bind = !vif_chassis || !vif_chassis[0]
+ || !strcmp(vif_chassis, chassis_rec->name)
+ || !strcmp(vif_chassis, chassis_rec->hostname);
if (can_bind && our_chassis) {
if (binding_rec->chassis != chassis_rec) {