[ovs-dev] [PATCH ovn branch-20.09] ovn-controller: Monitor chassis_private by chassis name.

Numan Siddique numans at ovn.org
Mon Jul 12 18:33:10 UTC 2021


On Fri, Jul 9, 2021 at 11:54 AM Dumitru Ceara <dceara at redhat.com> wrote:
>
> The backport looks good to me, thanks!

Thanks.  I applied this patch to branch-20.09.

Numan

>
> On 7/9/21 4:00 PM, Vladislav Odintsov wrote:
> > Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
> >
> > Regards,
> > Vladislav Odintsov
> >
> >> On 9 Jul 2021, at 16:55, Vladislav Odintsov <odivlad at gmail.com> wrote:
> >>
> >> Acked-by: Vladislav Odintsov <odivlad at gmail.com>
> >>
> >> Regards,
> >> Vladislav Odintsov
> >>
> >>> On 9 Jul 2021, at 16:10, Vladislav Odintsov <odivlad at gmail.com> wrote:
> >>>
> >>> From: Dumitru Ceara <dceara at redhat.com>
> >>>
> >>> Remove the use of sbrec_chassis_is_new() for uncommitted records.  This
> >>> is not the way IDL *_is_new() functions are supposed to be used.
> >>>
> >>> Note: With this change if the system-id changes there will be a
> >>> transient error in ovn-controller due to ovn-controller trying to insert
> >>> a new chassis_private record.  This is due to the fact that the view of
> >>> the chassis_private table changes and only chassis_private records
> >>> matching the new chassis name are sent to ovn-controller.  This gets
> >>> corrected though in the next iteration of the ovn-controller processing
> >>> loop.
> >>>
> >>> Suggested-by: Han Zhou <hzhou at ovn.org>
> >>> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2020-October/376339.html
> >>> Fixes: dce1af31b550 ("chassis: Fix chassis_private record updates when the system-id changes.")
> >>> Signed-off-by: Dumitru Ceara <dceara at redhat.com>
> >>> Acked-by: Mark Gray <mark.d.gray at redhat.com>
> >>> Signed-off-by: Han Zhou <hzhou at ovn.org>
> >>> (cherry picked from commit 1f915da95dc725131b7df094d494af9fda88ea92)
> >>> ---
> >>> controller/ovn-controller.c | 6 +++---
> >>> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> >>> index 3665c7b4e..b154a8486 100644
> >>> --- a/controller/ovn-controller.c
> >>> +++ b/controller/ovn-controller.c
> >>> @@ -181,7 +181,7 @@ update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
> >>>     * chassis */
> >>>    sbrec_port_binding_add_clause_type(&pb, OVSDB_F_EQ, "chassisredirect");
> >>>    sbrec_port_binding_add_clause_type(&pb, OVSDB_F_EQ, "external");
> >>> -    if (chassis && !sbrec_chassis_is_new(chassis)) {
> >>> +    if (chassis) {
> >>>        /* This should be mostly redundant with the other clauses for port
> >>>         * bindings, but it allows us to catch any ports that are assigned to
> >>>         * us but should not be.  That way, we can clear their chassis
> >>> @@ -205,8 +205,8 @@ update_sb_monitors(struct ovsdb_idl *ovnsb_idl,
> >>>                                            &chassis->header_.uuid);
> >>>
> >>>        /* Monitors Chassis_Private record for current chassis only. */
> >>> -        sbrec_chassis_private_add_clause_chassis(&chprv, OVSDB_F_EQ,
> >>> -                                                 &chassis->header_.uuid);
> >>> +        sbrec_chassis_private_add_clause_name(&chprv, OVSDB_F_EQ,
> >>> +                                              chassis->name);
> >>>    } else {
> >>>        /* During initialization, we monitor all records in Chassis_Private so
> >>>         * that we don't try to recreate existing ones. */
> >>> --
> >>> 2.30.0
> >>>
> >>
> >> _______________________________________________
> >> dev mailing list
> >> dev at openvswitch.org
> >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> >
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list