diff mbox series

[ovs-dev,OV,v2] ovn-nbctl.c: Fix lr-policy-del command

Message ID 20200515023740.7486-1-taoyunxiang@cmss.chinamobile.com
State New
Headers show
Series [ovs-dev,OV,v2] ovn-nbctl.c: Fix lr-policy-del command | expand

Commit Message

Tao YunXiang May 15, 2020, 2:37 a.m. UTC
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 <taoyunxiang@cmss.chinamobile.com>
Signed-off-by: Tao YunXiang <taoyunxiang@cmss.chinamobile.com>
CC: Dumitru Ceara <dceara@redhat.com>

---
 utilities/ovn-nbctl.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

0-day Robot May 15, 2020, 3 a.m. UTC | #1
Bleep bloop.  Greetings taoyunxiang@cmss.chinamobile.com, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
error: sha1 information is lacking or useless (utilities/ovn-nbctl.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 ovn-nbctl.c: Fix lr-policy-del command
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

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");
+            }
+
     /* If match is not specified, delete all routing policies with the
      * specified priority. */
         } else {