Message ID | 1468831196-16268-1-git-send-email-guru@ovn.org |
---|---|
State | Rejected |
Headers | show |
"dev" <dev-bounces@openvswitch.org> wrote on 07/18/2016 03:39:56 AM: > From: Gurucharan Shetty <guru@ovn.org> > To: dev@openvswitch.org > Date: 07/18/2016 01:39 PM > Subject: [ovs-dev] [PATCH] ovn-northd: Warn when the peer of a > router port is a switch port. > Sent by: "dev" <dev-bounces@openvswitch.org> > > Signed-off-by: Gurucharan Shetty <guru@ovn.org> > --- Is just printing a warning enough? I mean, shouldn't we try to *stop* this from happening? Ryan
On 18 July 2016 at 11:44, Ryan Moats <rmoats@us.ibm.com> wrote: > "dev" <dev-bounces@openvswitch.org> wrote on 07/18/2016 03:39:56 AM: > > > From: Gurucharan Shetty <guru@ovn.org> > > To: dev@openvswitch.org > > Date: 07/18/2016 01:39 PM > > Subject: [ovs-dev] [PATCH] ovn-northd: Warn when the peer of a > > router port is a switch port. > > Sent by: "dev" <dev-bounces@openvswitch.org> > > > > Signed-off-by: Gurucharan Shetty <guru@ovn.org> > > --- > > Is just printing a warning enough? > I mean, shouldn't we try to *stop* this from happening? > Stop a admin from creating a wrong config? I guess, that is what the warning does. There is also a "continue", which does "stop" the config from going through to SB database. > > Ryan > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
Guru Shetty <guru@ovn.org> wrote on 07/18/2016 01:48:36 PM: > From: Guru Shetty <guru@ovn.org> > To: Ryan Moats/Omaha/IBM@IBMUS > Cc: ovs dev <dev@openvswitch.org> > Date: 07/18/2016 01:48 PM > Subject: Re: [ovs-dev] [PATCH] ovn-northd: Warn when the peer of a > router port is a switch port. > > On 18 July 2016 at 11:44, Ryan Moats <rmoats@us.ibm.com> wrote: > "dev" <dev-bounces@openvswitch.org> wrote on 07/18/2016 03:39:56 AM: > > > From: Gurucharan Shetty <guru@ovn.org> > > To: dev@openvswitch.org > > Date: 07/18/2016 01:39 PM > > Subject: [ovs-dev] [PATCH] ovn-northd: Warn when the peer of a > > router port is a switch port. > > Sent by: "dev" <dev-bounces@openvswitch.org> > > > > Signed-off-by: Gurucharan Shetty <guru@ovn.org> > > --- > > Is just printing a warning enough? > > I mean, shouldn't we try to *stop* this from happening? > Stop a admin from creating a wrong config? I guess, that is what the > warning does. There is also a "continue", which does "stop" the > config from going through to SB database. > And... that's what I get for looking at the patch by itself and not at the full patched code... Since it does skip the config from triggering the issue, Acked-by: Ryan Moats <rmoats@us.ibm.com>
On Mon, Jul 18, 2016 at 01:39:56AM -0700, Gurucharan Shetty wrote: > Signed-off-by: Gurucharan Shetty <guru@ovn.org> Hmm. I think that the existing code here is a little strange and can be fixed up in a better way. Let me post a second version of my series from a few minutes ago. > --- > ovn/northd/ovn-northd.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c > index 7ce509d..0a093c7 100644 > --- a/ovn/northd/ovn-northd.c > +++ b/ovn/northd/ovn-northd.c > @@ -2603,6 +2603,14 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports, > continue; > } > > + if (peer->nbs) { > + static struct vlog_rate_limit rl = > + VLOG_RATE_LIMIT_INIT(5, 1); > + VLOG_WARN_RL(&rl, "Bad configuration: The peer of router " > + "port %s is a switch port", op->key); > + continue; > + } > + > ds_clear(&match); > ds_put_format(&match, "outport == %s && reg0 == ", > peer->json_key); > -- > 1.9.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index 7ce509d..0a093c7 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -2603,6 +2603,14 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports, continue; } + if (peer->nbs) { + static struct vlog_rate_limit rl = + VLOG_RATE_LIMIT_INIT(5, 1); + VLOG_WARN_RL(&rl, "Bad configuration: The peer of router " + "port %s is a switch port", op->key); + continue; + } + ds_clear(&match); ds_put_format(&match, "outport == %s && reg0 == ", peer->json_key);
Signed-off-by: Gurucharan Shetty <guru@ovn.org> --- ovn/northd/ovn-northd.c | 8 ++++++++ 1 file changed, 8 insertions(+)