On Wed, Mar 27, 2019 at 11:48 PM Han Zhou <zhou...@gmail.com> wrote: > On Wed, Mar 27, 2019 at 6:10 AM <nusid...@redhat.com> wrote: > > > @@ -2195,18 +2191,37 @@ ovn_port_update_sbrec(struct northd_context *ctx, > > if (op->derived) { > > const char *redirect_chassis = smap_get(&op->nbrp->options, > > "redirect-chassis"); > > - if (op->nbrp->n_gateway_chassis && redirect_chassis) { > > + if (op->nbrp->ha_chassis_group && > > + (op->nbrp->n_gateway_chassis || redirect_chassis)) { > > + char *msg; > > + if (op->nbrp->n_gateway_chassis && redirect_chassis) { > > + msg = "gateway_chassis and redirect-chassis"; > > + } else if (op->nbrp->n_gateway_chassis) { > > + msg = "gateway_chassis"; > > + } else { > > + msg = "redirect-chassis"; > > + } > > + > > static struct vlog_rate_limit rl = > VLOG_RATE_LIMIT_INIT(1, 1); > > VLOG_WARN_RL( > > - &rl, "logical router port %s has both options:" > > - "redirect-chassis and gateway_chassis > populated " > > - "redirect-chassis will be ignored in favour of > " > > - "gateway chassis", op->nbrp->name); > > + &rl, "logical router port %s has " > > + "ha_chassis_group and %s populated. " > > + "%s will be ignored in favour of " > > + "ha_chassis_group", op->nbrp->name, msg, msg); > > } > > Thanks for updating the warning. It is better than before, but still > one combination is not covered: if user configured redirect-chassis + > gateway_chassis, without ha_chassis_group, it would still be better to > warn that "gateway-chassis" is prefered over "redirect-chassis". It > may be simpler to just check the three conditions with a counter, and > if counter > 1, just print same message about the preference order. > > Thanks. Done in v6.
> This is very minor problem. So: > > Acked-by: Han Zhou <hzh...@ebay.com> > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev