Message ID | 20180707111004.8320-31-jkbs@redhat.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <ovs-dev-bounces@openvswitch.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41N8Qs08hBz9s0w for <incoming@patchwork.ozlabs.org>; Sat, 7 Jul 2018 21:25:25 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E3988D3D; Sat, 7 Jul 2018 11:10:55 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 29B7FD3D for <dev@openvswitch.org>; Sat, 7 Jul 2018 11:10:54 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id ABAA776F for <dev@openvswitch.org>; Sat, 7 Jul 2018 11:10:52 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id v3-v6so12937579wmh.0 for <dev@openvswitch.org>; Sat, 07 Jul 2018 04:10:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Hzerj2Pi+GkIk+wO9tVollILsPKkPhhGvbvZCdRAiHE=; b=RrZTQcXgrZq7kchNMZR9uRBB9v0KKGkKoCNUGjsg95WduvNWMYtmqP5ccLsMFldh1l LnYwAR/LNntuLuex3J8sOhMjf7roQh9SivD0dc1bC4f+8ND0JeBXaTrTBRCREnz84vIk 4lukDBlL+Mx9OFJ8LZ5oICAfAng5z7njEYCcdIlzbUjO7A4aGYMgbZ31/OdD/3ckg4Bs Pi3d/3eBoyGXRMDJqg3EZF5V5jyzbR4JpjZsLuvxqQfqoF9Aw9g0B+ZEhp0wRLRrs9oa dUUBt92LyfhF2132RBYLmVmcVj0DPeNAxWZhGUoSIKdUmKDI9rF1pfr6+OEhN7vFFC5F 6+fA== X-Gm-Message-State: APt69E05JEobUYIjjTGFLjYXoIs+BEnfNTTPvVqdZJ9xCZxPefZ52hgW lvGVF2+gbk1x7oiNH+VzKObvNJVRItU= X-Google-Smtp-Source: AAOMgpeFi0APnC+RpO9gTDrSl+tFrSKBBwZz8KkjFmOV8nt9N1Rqf4apGs+OLX+F+yLDI4QpVl4jtg== X-Received: by 2002:a1c:ea17:: with SMTP id i23-v6mr7354478wmh.29.1530961851218; Sat, 07 Jul 2018 04:10:51 -0700 (PDT) Received: from redhat.com (218.red-2-136-166.dynamicip.rima-tde.net. [2.136.166.218]) by smtp.gmail.com with ESMTPSA id o17-v6sm9677174wrp.62.2018.07.07.04.10.50 for <dev@openvswitch.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jul 2018 04:10:50 -0700 (PDT) From: Jakub Sitnicki <jkbs@redhat.com> To: dev@openvswitch.org Date: Sat, 7 Jul 2018 13:10:04 +0200 Message-Id: <20180707111004.8320-31-jkbs@redhat.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180707111004.8320-1-jkbs@redhat.com> References: <20180707111004.8320-1-jkbs@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 30/30] ovn-nbctl: Don't die in nbctl_lsp_set_type(). X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: <ovs-dev.openvswitch.org> List-Unsubscribe: <https://mail.openvswitch.org/mailman/options/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe> List-Archive: <http://mail.openvswitch.org/pipermail/ovs-dev/> List-Post: <mailto:ovs-dev@openvswitch.org> List-Help: <mailto:ovs-dev-request@openvswitch.org?subject=help> List-Subscribe: <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org |
Series |
Get rid of ctl_fatal() calls in ovn-nbctl (part 1)
|
expand
|
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; } }
Propagate the error via the context instead. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> --- ovn/utilities/ovn-nbctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)