[ovs-dev] [PATCH 26/30] ovn-nbctl: Don't die in nbctl_lrp_del_gateway_chassis().
Jakub Sitnicki
jkbs at redhat.com
Sat Jul 7 11:10:00 UTC 2018
Propagate the error via the context instead.
Signed-off-by: Jakub Sitnicki <jkbs at redhat.com>
---
ovn/utilities/ovn-nbctl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index aeb401962..1591ce47d 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -3387,7 +3387,8 @@ nbctl_lrp_del_gateway_chassis(struct ctl_context *ctx)
const struct nbrec_logical_router_port *lrp;
char *error = lrp_by_name_or_uuid(ctx, ctx->argv[1], true, &lrp);
if (error) {
- ctl_fatal("%s", error);
+ ctx->error = error;
+ return;
}
if (!lrp) {
return;
@@ -3404,7 +3405,7 @@ nbctl_lrp_del_gateway_chassis(struct ctl_context *ctx)
}
/* Can't happen because of the database schema. */
- ctl_fatal("chassis %s is not added to logical port %s",
+ ctl_error(ctx, "chassis %s is not added to logical port %s",
chassis_name, ctx->argv[1]);
}
--
2.14.4
More information about the dev
mailing list