diff options
author | Jakub Sitnicki <jkbs@redhat.com> | 2018-07-02 12:50:09 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-07-03 13:19:45 -0700 |
commit | fd26f9a2bd3d119facc45d54f24484b7a3db9221 (patch) | |
tree | 9ed41ebd07c04d2b0c3cfe48e58f66001256b4d5 /ovn | |
parent | 0e8e4c8f8d1efea3024cda70f5156473daf4466a (diff) | |
download | openvswitch-fd26f9a2bd3d119facc45d54f24484b7a3db9221.tar.gz |
db-ctl-base: Don't die in ctl_set_column() on error.
Return the error message to the caller instead of reporting it and dying
so that the caller can handle the error without terminating the process
if needed.
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r-- | ovn/utilities/ovn-nbctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 10ead0fc5..fc1b1fea7 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -3279,8 +3279,11 @@ nbctl_lrp_add(struct ctl_context *ctx) nbrec_logical_router_port_set_networks(lrp, networks, n_networks); for (int i = 0; i < n_settings; i++) { - ctl_set_column("Logical_Router_Port", &lrp->header_, settings[i], - ctx->symtab); + char *error = ctl_set_column("Logical_Router_Port", &lrp->header_, + settings[i], ctx->symtab); + if (error) { + ctl_fatal("%s", error); + } } /* Insert the logical port into the logical router. */ |