Message ID | 20180707111004.8320-27-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 41N8Nq1qyNz9s0n for <incoming@patchwork.ozlabs.org>; Sat, 7 Jul 2018 21:23:39 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 603EBCE3; Sat, 7 Jul 2018 11:10:48 +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 EADB8D33 for <dev@openvswitch.org>; Sat, 7 Jul 2018 11:10:46 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7BD22765 for <dev@openvswitch.org>; Sat, 7 Jul 2018 11:10:46 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id j33-v6so6402398wrj.5 for <dev@openvswitch.org>; Sat, 07 Jul 2018 04:10:46 -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=LgGR5htqjOAMQPiTDp+Sb3pOEndwLXmiGMfV329vlhg=; b=NZurvm9aqTi6vJ7kpRTvXFRS8pA1gzKWcksbBL1JdPVhh3mBH7pxCOSkxUZyAOU31e t09MM41PVyeyHbaOsjxUFopRAAVm3pQrUw66GCrzoTbYETMZCks7622NE0zKllPv8bM3 vZbmK6CoDKv4q9DkE7pVlO6Q+Ebpo1Dr+OstJz4/ws3Xl069xXKkf1pL7CumQ/KxsvRo SzVtPcWfgQCjI1oJcG46kxGj6q+K8ODpA8zjl3wi8ck0LeAsvMICepFgW/BUYuawL9Z0 7s90R6YAhrUO3Lf5zceuXymoNjOyck/7pLhq+L61jmNe99IHOQ2aF8UeV70/5Kv5CDcn F7iw== X-Gm-Message-State: APt69E2SsrC6wqVPUTh/kaQIKvDBMqMOtIL68RGp24CQWhCDqtW+ZayK whvV8Rtcy4W7Wl+HQzyXqtVWNJcN+yI= X-Google-Smtp-Source: AAOMgpcFR+bSjP6OWpnq1D2Z7iwNuPT1J5GyYKJzRnwINS9YAcmsbp/CASdAajeO9fb7CNxzUeQTWA== X-Received: by 2002:adf:f002:: with SMTP id j2-v6mr9151834wro.260.1530961844944; Sat, 07 Jul 2018 04:10:44 -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 a17-v6sm8181268wrr.81.2018.07.07.04.10.44 for <dev@openvswitch.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jul 2018 04:10:44 -0700 (PDT) From: Jakub Sitnicki <jkbs@redhat.com> To: dev@openvswitch.org Date: Sat, 7 Jul 2018 13:10:00 +0200 Message-Id: <20180707111004.8320-27-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 26/30] ovn-nbctl: Don't die in nbctl_lrp_del_gateway_chassis(). 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 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]); }
Propagate the error via the context instead. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> --- ovn/utilities/ovn-nbctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)