Propagate the error via the context instead.

Signed-off-by: Jakub Sitnicki <[email protected]>
---
 ovn/utilities/ovn-nbctl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index 894c88689..56e47c1f0 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -2183,7 +2183,8 @@ nbctl_lb_del(struct ctl_context *ctx)
 
     char *error = lb_by_name_or_uuid(ctx, id, false, &lb);
     if (error) {
-        ctl_fatal("%s", error);
+        ctx->error = error;
+        return;
     }
     if (!lb) {
         return;
@@ -2204,8 +2205,9 @@ nbctl_lb_del(struct ctl_context *ctx)
             return;
         }
         if (must_exist) {
-            ctl_fatal("vip %s is not part of the load balancer.",
-                    lb_vip);
+            ctl_error(ctx, "vip %s is not part of the load balancer.",
+                      lb_vip);
+            return;
         }
         return;
     }
-- 
2.14.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to