Message ID | 20180707111004.8320-19-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 41N8Hr3Czxz9s0n for <incoming@patchwork.ozlabs.org>; Sat, 7 Jul 2018 21:19:20 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 80586CFC; Sat, 7 Jul 2018 11:10:36 +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 760DACAF for <dev@openvswitch.org>; Sat, 7 Jul 2018 11:10:34 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D642C76A for <dev@openvswitch.org>; Sat, 7 Jul 2018 11:10:33 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id j33-v6so6402011wrj.5 for <dev@openvswitch.org>; Sat, 07 Jul 2018 04:10:33 -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=spgQ1UtJorJ0oisM381GuYGtzUSdtax0rLa1BEj0AuQ=; b=uoYbtoZF8XeqIX+U9FOU4hdNRrfPYDz5ndJWlQ9uYBwzjQjsGmo5dwMVQBBrPBjE0b VDmhZDdiI9KKd9f/XSybSD8Ay4tjfkVoZlmf/Mb35AKqzueKQMwdfG8bmU0XTrSjOi8V r6Il6ocSdLegZVhPKHOJGStp+9TQ2ZtYGvo/vc9hs4O9fnE35v1aggqNTpA7E4kRdWdD D1YtTnv0QocrHNTryV6YHk/xBtqwaikcFnkHOj9qqct6w0umUq6kW6r7Oo03gGk9Syj6 /kbcNeyKuPJRSXsXaLeHPKpKqzv2PEAnxbTHWlt2+mVd0SFaLhn9Zzz6V2GzTR22aJ5M ICEg== X-Gm-Message-State: APt69E27p/3ditMDq5OduPLScB+gvSXvEjHBOZZhbH0S2oeCoouJGl/N CDaB8+wqWY5mcBMOBaL22jiXwblaje8= X-Google-Smtp-Source: AAOMgpfklKPYFCwUiSKsstRlxVW3IBj+FTlTHzwwozPhwcRhDhBXfQdnc6EmGO+9jUt8wZFxga5Diw== X-Received: by 2002:adf:8e89:: with SMTP id q9-v6mr10149667wrb.261.1530961832326; Sat, 07 Jul 2018 04:10:32 -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 b6-v6sm15108524wru.66.2018.07.07.04.10.31 for <dev@openvswitch.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jul 2018 04:10:31 -0700 (PDT) From: Jakub Sitnicki <jkbs@redhat.com> To: dev@openvswitch.org Date: Sat, 7 Jul 2018 13:09:52 +0200 Message-Id: <20180707111004.8320-19-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 18/30] ovn-nbctl: Don't die in nbctl_lb_del() 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 894c88689..56e47c1f0 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -2183,7 +2183,8 @@ nbctl_lb_del(struct ctl_context *ctx) char *error = lb_by_name_or_uuid(ctx, id, false, &lb); if (error) { - ctl_fatal("%s", error); + ctx->error = error; + return; } if (!lb) { return; @@ -2204,8 +2205,9 @@ nbctl_lb_del(struct ctl_context *ctx) return; } if (must_exist) { - ctl_fatal("vip %s is not part of the load balancer.", - lb_vip); + ctl_error(ctx, "vip %s is not part of the load balancer.", + lb_vip); + return; } return; }
Propagate the error via the context instead. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> --- ovn/utilities/ovn-nbctl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)