diff mbox series

[ovs-dev] ovn-controller-vtep: Set chassis_name for newly created Encap.

Message ID 20210420103221.1123-1-dceara@redhat.com
State Accepted
Headers show
Series [ovs-dev] ovn-controller-vtep: Set chassis_name for newly created Encap. | expand

Commit Message

Dumitru Ceara April 20, 2021, 10:32 a.m. UTC
Without this ovn-controller-vtep fails to register new chassis when RBAC
is enabled.

Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2021-April/382207.html
Reported-by: Odintsov Vladislav <VlOdintsov@croc.ru>
Fixes: d06760b64276 ("ovn: Restrict encap modification to its creating chassis")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 controller-vtep/gateway.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Michelson April 20, 2021, 5:58 p.m. UTC | #1
Acked-by: Mark Michelson <mmichels@redhat.com>

On 4/20/21 6:32 AM, Dumitru Ceara wrote:
> Without this ovn-controller-vtep fails to register new chassis when RBAC
> is enabled.
> 
> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2021-April/382207.html
> Reported-by: Odintsov Vladislav <VlOdintsov@croc.ru>
> Fixes: d06760b64276 ("ovn: Restrict encap modification to its creating chassis")
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
>   controller-vtep/gateway.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/controller-vtep/gateway.c b/controller-vtep/gateway.c
> index 636dab365..e9419138b 100644
> --- a/controller-vtep/gateway.c
> +++ b/controller-vtep/gateway.c
> @@ -59,6 +59,7 @@ create_chassis_rec(struct ovsdb_idl_txn *txn, const char *name,
>       sbrec_encap_set_ip(encap_rec, encap_ip);
>       const struct smap options = SMAP_CONST1(&options, "csum", "false");
>       sbrec_encap_set_options(encap_rec, &options);
> +    sbrec_encap_set_chassis_name(encap_rec, name);
>       sbrec_chassis_set_encaps(chassis_rec, &encap_rec, 1);
>   
>       return chassis_rec;
>
Odintsov Vladislav April 20, 2021, 6:55 p.m. UTC | #2
Hi,

Thanks for the quick reaction!
I've tested your patch against 20.06.3 and it works well for me.
May I ask you to backport your patch down to supported branches?
 
Tested-by: Vladislav Odintsov <odivlad@gmail.com>

On 20.04.2021, 20:58, "dev on behalf of Mark Michelson" <ovs-dev-bounces@openvswitch.org on behalf of mmichels@redhat.com> wrote:

    Acked-by: Mark Michelson <mmichels@redhat.com>

    On 4/20/21 6:32 AM, Dumitru Ceara wrote:
    > Without this ovn-controller-vtep fails to register new chassis when RBAC
    > is enabled.
    > 
    > Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2021-April/382207.html
    > Reported-by: Odintsov Vladislav <VlOdintsov@croc.ru>
    > Fixes: d06760b64276 ("ovn: Restrict encap modification to its creating chassis")
    > Signed-off-by: Dumitru Ceara <dceara@redhat.com>
    > ---
    >   controller-vtep/gateway.c | 1 +
    >   1 file changed, 1 insertion(+)
    > 
    > diff --git a/controller-vtep/gateway.c b/controller-vtep/gateway.c
    > index 636dab365..e9419138b 100644
    > --- a/controller-vtep/gateway.c
    > +++ b/controller-vtep/gateway.c
    > @@ -59,6 +59,7 @@ create_chassis_rec(struct ovsdb_idl_txn *txn, const char *name,
    >       sbrec_encap_set_ip(encap_rec, encap_ip);
    >       const struct smap options = SMAP_CONST1(&options, "csum", "false");
    >       sbrec_encap_set_options(encap_rec, &options);
    > +    sbrec_encap_set_chassis_name(encap_rec, name);
    >       sbrec_chassis_set_encaps(chassis_rec, &encap_rec, 1);
    >   
    >       return chassis_rec;
    > 

    _______________________________________________
    dev mailing list
    dev@openvswitch.org
    https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Dumitru Ceara April 21, 2021, 7:43 a.m. UTC | #3
On 4/20/21 8:55 PM, Odintsov Vladislav wrote:
> Hi,
> 
> Thanks for the quick reaction!
> I've tested your patch against 20.06.3 and it works well for me.
> May I ask you to backport your patch down to supported branches?
>  
> Tested-by: Vladislav Odintsov <odivlad@gmail.com>

Thanks for trying it out, Vladislav, and thanks for the review, Mark!

As this is a bug fix and it applies cleanly to all supported branches,
when it's merged I'm pretty sure the maintainers can backport it
directly there.

Regards,
Dumitru
Numan Siddique April 21, 2021, 1:27 p.m. UTC | #4
On Wed, Apr 21, 2021 at 3:43 AM Dumitru Ceara <dceara@redhat.com> wrote:
>
> On 4/20/21 8:55 PM, Odintsov Vladislav wrote:
> > Hi,
> >
> > Thanks for the quick reaction!
> > I've tested your patch against 20.06.3 and it works well for me.
> > May I ask you to backport your patch down to supported branches?
> >
> > Tested-by: Vladislav Odintsov <odivlad@gmail.com>
>
> Thanks for trying it out, Vladislav, and thanks for the review, Mark!
>
> As this is a bug fix and it applies cleanly to all supported branches,
> when it's merged I'm pretty sure the maintainers can backport it
> directly there.

Thanks Dumitru, Vladislav and Mark.

I applied this patch to the main branch and backported to branch-21.03
and all the way down to branch-20.03.

Thanks

Numan

>
> Regards,
> Dumitru
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/controller-vtep/gateway.c b/controller-vtep/gateway.c
index 636dab365..e9419138b 100644
--- a/controller-vtep/gateway.c
+++ b/controller-vtep/gateway.c
@@ -59,6 +59,7 @@  create_chassis_rec(struct ovsdb_idl_txn *txn, const char *name,
     sbrec_encap_set_ip(encap_rec, encap_ip);
     const struct smap options = SMAP_CONST1(&options, "csum", "false");
     sbrec_encap_set_options(encap_rec, &options);
+    sbrec_encap_set_chassis_name(encap_rec, name);
     sbrec_chassis_set_encaps(chassis_rec, &encap_rec, 1);
 
     return chassis_rec;