From patchwork Thu Dec 29 15:47:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guoshuai Li X-Patchwork-Id: 709520 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 3tqDXV2656z9sdn for ; Fri, 30 Dec 2016 02:48:26 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 45EA040A; Thu, 29 Dec 2016 15:48:22 +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 6D3AE6C for ; Thu, 29 Dec 2016 15:48:20 +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 1D1B28C for ; Thu, 29 Dec 2016 15:48:15 +0000 (UTC) X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1166112|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03280; MF=ligs@dtdream.com; NM=1; PH=DS; RN=2; RT=2; SR=0; TI=SMTPD_---.7Mppyhc_1483026480; Received: from localhost.localdomain(mailfrom:ligs@dtdream.com ip:122.71.69.41) by smtp.aliyun-inc.com(10.147.41.143); Thu, 29 Dec 2016 23:48:07 +0800 From: Guoshuai Li To: ovs-dev@openvswitch.org Date: Thu, 29 Dec 2016 23:47:58 +0800 Message-Id: <1483026478-16183-1-git-send-email-ligs@dtdream.com> X-Mailer: git-send-email 2.7.4 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 Subject: [ovs-dev] [PATCH] ovn: fix data loss after an OVN-DB's backup node promote used 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 master node shut down, VIP and OVNDB Master will go to other node. On the node that will become the master, if the VIP starts upgrading earlier than OVNDB promote, the ovsdb process in backup state will reconnects to the VIP at its own node, and clears the data in the local database in RPL_S_SEMEME_REQUESTED state. So the VIP started must be after OVNDB promote. See also: http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/ Pacemaker_Explained/s-resource-ordering.html Signed-off-by: Guoshuai Li Acked-by: Andy Zhou --- Documentation/topics/integration.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/topics/integration.rst b/Documentation/topics/integration.rst index e3c2092..2f4043e 100644 --- a/Documentation/topics/integration.rst +++ b/Documentation/topics/integration.rst @@ -252,6 +252,6 @@ with the active server:: $ pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=x.x.x.x \ op monitor interval=30s - $ pcs constraint order VirtualIP then ovndb_servers-master - $ pcs constraint colocation add master ovndb_servers-master with VirtualIP \ + $ pcs constraint order promote ovndb_servers-master then VirtualIP + $ pcs constraint colocation add VirtualIP with master ovndb_servers-master \ score=INFINITY