On Fri, May 15, 2020 at 1:45 PM Tao YunXiang <
[email protected]> wrote:

> This change will check the existence of lr-policy uuid.
> If not, it will print "uuid is not found".
>
> Fixes: 1b030874c32("ovn-nbctl.c: Add an optional way to delete router
> policy by uuid")
>
>
> Author: Tao YunXiang <[email protected]>
> Signed-off-by: Tao YunXiang <[email protected]>
> CC: Dumitru Ceara <[email protected]>
>
> ---
>  utilities/ovn-nbctl.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
> index f4da7c8ed..185146ac9 100644
> --- a/utilities/ovn-nbctl.c
> +++ b/utilities/ovn-nbctl.c
> @@ -3647,6 +3647,10 @@ nbctl_lr_policy_del(struct ctl_context *ctx)
>                      new_policies[n_policies++] = lr->policies[i];
>                  }
>              }
> +            if (n_policies == lr->n_policies) {
> +                ctl_error(ctx, "uuid is not found");
> +            }
>

Thanks for the patch.

I applied this patch to master with the below 2 changes

--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -3648,7 +3648,7 @@ nbctl_lr_policy_del(struct ctl_context *ctx)
                 }
             }
             if (n_policies == lr->n_policies) {
-                ctl_error(ctx, "uuid is not found");
+                ctl_error(ctx, "Logical router policy uuid is not found.");
+                return;
             }


Thanks
Numan


> +
>      /* If match is not specified, delete all routing policies with the
>       * specified priority. */
>          } else {
> --
> 2.17.1
>
>
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to