From patchwork Wed Dec 7 05:41:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoshuai Li X-Patchwork-Id: 703450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3tYS6d3c4fz9t1B for ; Wed, 7 Dec 2016 16:41:45 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6A261B44; Wed, 7 Dec 2016 05:41:42 +0000 (UTC) X-Original-To: ovs-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 69C79AB6 for ; Wed, 7 Dec 2016 05:41:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2203-239.mail.aliyun.com (smtp2203-239.mail.aliyun.com [121.197.203.239]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 5946D180 for ; Wed, 7 Dec 2016 05:41:33 +0000 (UTC) X-Alimail-AntiSpam: AC=CONTINUE; BC=0.2603681|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03296; MF=ligs@dtdream.com; NM=1; PH=DS; RN=2; RT=2; SR=0; TI=SMTPD_---.7GhDPYh_1481089275; Received: from localhost.localdomain(mailfrom:ligs@dtdream.com ip:111.198.29.132) by smtp.aliyun-inc.com(10.147.42.198); Wed, 07 Dec 2016 13:41:15 +0800 From: Guoshuai Li To: ovs-dev@openvswitch.org Date: Wed, 7 Dec 2016 13:41:06 +0800 Message-Id: <20161207054106.20828-1-ligs@dtdream.com> X-Mailer: git-send-email 2.10.1.windows.1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Guoshuai Li Subject: [ovs-dev] [PATCH] ovn: fix OVNDB process is stopped when master node demote to the slave by pacemaker X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org When the master node's OVNDB process fails, the local node demote to the slave. Failure cause is that the OVNDB process is stop, So the need to re-run the process up. if return $OCF_NOT_RUNNING will not demote the node to slave. Signed-off-by: Guoshuai Li --- ovn/utilities/ovndb-servers.ocf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovn/utilities/ovndb-servers.ocf b/ovn/utilities/ovndb-servers.ocf index 1cf6f20..8a64e88 100755 --- a/ovn/utilities/ovndb-servers.ocf +++ b/ovn/utilities/ovndb-servers.ocf @@ -283,7 +283,7 @@ ovsdb_server_promote() { ovsdb_server_demote() { ovsdb_server_check_status if [ $? = $OCF_NOT_RUNNING ]; then - return $OCF_NOT_RUNNING + ovsdb_server_start fi local present_master=$(ovsdb_server_find_active_master)