Message ID | 20181102162306.4402-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] ovn-northd: Always set nat_addresses and options in Port_Binding. | expand |
On Fri, Nov 2, 2018 at 10:40 PM Ben Pfaff <blp@ovn.org> wrote: > In some cases the code didn't set these columns. > > Found by inspection. > > Signed-off-by: Ben Pfaff <blp@ovn.org> > Acked-by: Numan Siddique <nusiddiq@redhat.com> > --- > ovn/northd/ovn-northd.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c > index e42ceea99264..665b0d820a05 100644 > --- a/ovn/northd/ovn-northd.c > +++ b/ovn/northd/ovn-northd.c > @@ -2170,6 +2170,8 @@ ovn_port_update_sbrec(struct northd_context *ctx, > > struct smap ids = SMAP_INITIALIZER(&ids); > sbrec_port_binding_set_external_ids(op->sb, &ids); > + > + sbrec_port_binding_set_nat_addresses(op->sb, NULL, 0); > } else { > if (strcmp(op->nbsp->type, "router")) { > uint32_t queue_id = smap_get_int( > @@ -2202,6 +2204,8 @@ ovn_port_update_sbrec(struct northd_context *ctx, > &rl, "Unknown port type '%s' set on logical switch > '%s'.", > op->nbsp->type, op->nbsp->name); > } > + > + sbrec_port_binding_set_nat_addresses(op->sb, NULL, 0); > } else { > const char *chassis = NULL; > if (op->peer && op->peer->od && op->peer->od->nbr) { > @@ -2229,6 +2233,8 @@ ovn_port_update_sbrec(struct northd_context *ctx, > } > sbrec_port_binding_set_options(op->sb, &new); > smap_destroy(&new); > + } else { > + sbrec_port_binding_set_options(op->sb, NULL); > } > > const char *nat_addresses = smap_get(&op->nbsp->options, > -- > 2.16.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
On Mon, Nov 05, 2018 at 08:55:51PM +0530, Numan Siddique wrote: > On Fri, Nov 2, 2018 at 10:40 PM Ben Pfaff <blp@ovn.org> wrote: > > > In some cases the code didn't set these columns. > > > > Found by inspection. > > > > Signed-off-by: Ben Pfaff <blp@ovn.org> > > > > Acked-by: Numan Siddique <nusiddiq@redhat.com> Thanks, applied to master.
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index e42ceea99264..665b0d820a05 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -2170,6 +2170,8 @@ ovn_port_update_sbrec(struct northd_context *ctx, struct smap ids = SMAP_INITIALIZER(&ids); sbrec_port_binding_set_external_ids(op->sb, &ids); + + sbrec_port_binding_set_nat_addresses(op->sb, NULL, 0); } else { if (strcmp(op->nbsp->type, "router")) { uint32_t queue_id = smap_get_int( @@ -2202,6 +2204,8 @@ ovn_port_update_sbrec(struct northd_context *ctx, &rl, "Unknown port type '%s' set on logical switch '%s'.", op->nbsp->type, op->nbsp->name); } + + sbrec_port_binding_set_nat_addresses(op->sb, NULL, 0); } else { const char *chassis = NULL; if (op->peer && op->peer->od && op->peer->od->nbr) { @@ -2229,6 +2233,8 @@ ovn_port_update_sbrec(struct northd_context *ctx, } sbrec_port_binding_set_options(op->sb, &new); smap_destroy(&new); + } else { + sbrec_port_binding_set_options(op->sb, NULL); } const char *nat_addresses = smap_get(&op->nbsp->options,
In some cases the code didn't set these columns. Found by inspection. Signed-off-by: Ben Pfaff <blp@ovn.org> --- ovn/northd/ovn-northd.c | 6 ++++++ 1 file changed, 6 insertions(+)