[ovs-dev] OVN: fix L4 default lb proto reported by ovn-nbctl
diff mbox series

Message ID 1d4a4a5077d0d2a852fc729020d209905974bbb8.1564680915.git.lorenzo.bianconi@redhat.com
State New
Headers show
Series
  • [ovs-dev] OVN: fix L4 default lb proto reported by ovn-nbctl
Related show

Commit Message

Lorenzo Bianconi Aug. 1, 2019, 5:38 p.m. UTC
If no protocol is specified defining a load balancing rule TCP is
selected as default but ovn-nbctl lb-list reports 'tcp/udp'.
Fix it reporting 'tcp' in this case

Fixes: e2bfcad6cbb0 ("ovn-nbctl: Add LB commands")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 ovn/utilities/ovn-nbctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dumitru Ceara Aug. 2, 2019, 12:40 p.m. UTC | #1
On Thu, Aug 1, 2019 at 7:40 PM Lorenzo Bianconi
<lorenzo.bianconi@redhat.com> wrote:
>
> If no protocol is specified defining a load balancing rule TCP is
> selected as default but ovn-nbctl lb-list reports 'tcp/udp'.
> Fix it reporting 'tcp' in this case
>
> Fixes: e2bfcad6cbb0 ("ovn-nbctl: Add LB commands")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

Looks good to me.
Acked-by: Dumitru Ceara <dceara@redhat.com>

> ---
>  ovn/utilities/ovn-nbctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
> index 98a8faa0b..7a38b2bf7 100644
> --- a/ovn/utilities/ovn-nbctl.c
> +++ b/ovn/utilities/ovn-nbctl.c
> @@ -2864,7 +2864,7 @@ lb_info_add_smap(const struct nbrec_load_balancer *lb,
>                  continue;
>              }
>
> -            char *protocol = ss_get_port(&ss) ? lb->protocol : "tcp/udp";
> +            char *protocol = ss_get_port(&ss) ? lb->protocol : "tcp";
>              i == 0 ? ds_put_format(&val,
>                          UUID_FMT "    %-20.16s%-11.7s%-*.*s%s",
>                          UUID_ARGS(&lb->header_.uuid),
> --
> 2.21.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Numan Siddique Aug. 2, 2019, 2:26 p.m. UTC | #2
On Fri, Aug 2, 2019 at 6:11 PM Dumitru Ceara <dceara@redhat.com> wrote:

> On Thu, Aug 1, 2019 at 7:40 PM Lorenzo Bianconi
> <lorenzo.bianconi@redhat.com> wrote:
> >
> > If no protocol is specified defining a load balancing rule TCP is
> > selected as default but ovn-nbctl lb-list reports 'tcp/udp'.
> > Fix it reporting 'tcp' in this case
> >
> > Fixes: e2bfcad6cbb0 ("ovn-nbctl: Add LB commands")
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>
> Looks good to me.
> Acked-by: Dumitru Ceara <dceara@redhat.com>
>
>
Hi Lorenzo,

I applied this patch locally  to the OVN repo and I see below test failures.
Can you please check this out.

Can you please submit the patch targeting the OVN repo :).

*****
143: ovn-nbctl - LBs - daemon                        FAILED (
ovn-nbctl.at:553)
142: ovn-nbctl - LBs - direct                        FAILED (
ovn-nbctl.at:553)
145: ovn-nbctl - LBs IPv6 - daemon                   FAILED (
ovn-nbctl.at:781)
144: ovn-nbctl - LBs IPv6 - direct                   FAILED (
ovn-nbctl.at:781)
******

Thanks
Numan



> ---
> >  ovn/utilities/ovn-nbctl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
> > index 98a8faa0b..7a38b2bf7 100644
> > --- a/ovn/utilities/ovn-nbctl.c
> > +++ b/ovn/utilities/ovn-nbctl.c
> > @@ -2864,7 +2864,7 @@ lb_info_add_smap(const struct nbrec_load_balancer
> *lb,
> >                  continue;
> >              }
> >
> > -            char *protocol = ss_get_port(&ss) ? lb->protocol :
> "tcp/udp";
> > +            char *protocol = ss_get_port(&ss) ? lb->protocol : "tcp";
> >              i == 0 ? ds_put_format(&val,
> >                          UUID_FMT "    %-20.16s%-11.7s%-*.*s%s",
> >                          UUID_ARGS(&lb->header_.uuid),
> > --
> > 2.21.0
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>

Patch
diff mbox series

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index 98a8faa0b..7a38b2bf7 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -2864,7 +2864,7 @@  lb_info_add_smap(const struct nbrec_load_balancer *lb,
                 continue;
             }
 
-            char *protocol = ss_get_port(&ss) ? lb->protocol : "tcp/udp";
+            char *protocol = ss_get_port(&ss) ? lb->protocol : "tcp";
             i == 0 ? ds_put_format(&val,
                         UUID_FMT "    %-20.16s%-11.7s%-*.*s%s",
                         UUID_ARGS(&lb->header_.uuid),