From bd32425ff5385a40f420c6327577a0a088534226 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 1 Sep 2017 14:24:12 -0400 Subject: 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 Acked-by: Lance Richardson --- ovn/controller/binding.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ovn/controller') 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) { -- cgit v1.2.1