diff options
author | Jakub Sitnicki <jkbs@redhat.com> | 2018-07-07 13:10:04 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-07-09 15:46:15 -0700 |
commit | aaf0016add4f049e86d9572589ae9ab6232e2db8 (patch) | |
tree | 2e32388b3e2dd1b0ed0c1e70c2540f2a949e91a0 /ovn/utilities | |
parent | 5a3d7045fa963c044ebb5feed97f429f1ec23552 (diff) | |
download | openvswitch-aaf0016add4f049e86d9572589ae9ab6232e2db8.tar.gz |
ovn-nbctl: Don't die in nbctl_lsp_set_type().
Propagate the error via the context instead.
Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn/utilities')
-rw-r--r-- | ovn/utilities/ovn-nbctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 1781bf1f8..1181cdfba 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -1360,13 +1360,15 @@ nbctl_lsp_set_type(struct ctl_context *ctx) char *error = lsp_by_name_or_uuid(ctx, id, true, &lsp); if (error) { - ctl_fatal("%s", error); + ctx->error = error; + return; } if (ovn_is_known_nb_lsp_type(type)) { nbrec_logical_switch_port_set_type(lsp, type); } else { - ctl_fatal("Logical switch port type '%s' is unrecognized. " + ctl_error(ctx, "Logical switch port type '%s' is unrecognized. " "Not setting type.", type); + return; } } |