From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNncT-00049b-31 for qemu-devel@nongnu.org; Mon, 25 Jan 2016 15:20:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNncR-0001Gy-TB for qemu-devel@nongnu.org; Mon, 25 Jan 2016 15:20:13 -0500 Date: Mon, 25 Jan 2016 20:20:02 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20160125202001.GL2464@work-vm> References: <20160122193534.GF2482@work-vm> <56A57B43.1040103@cn.fujitsu.com> <56A58441.4030704@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56A58441.4030704@cn.fujitsu.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] COLO: how to flip a secondary to a primary? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Zhijian Cc: Changlong Xie , zhanghailiang , qemu block , qemu devel , Luis Tomas , Simon Kollberg , Abel Souza * Li Zhijian (lizhijian@cn.fujitsu.com) wrote: >=20 >=20 > On 01/25/2016 09:32 AM, Wen Congyang wrote: > >>> f) I've not thought about the colo-proxy that much yet - I guess= that > >>> existing connections need to keep their sequence number offse= t but >=20 > Strictly speaking=EF=BC=8C after failover, we only need to keep servici= ng for the tcp connections which are > established after the last checkpoint but not all existing connections.= Because after a checkpoint > =EF=BC=88primary and secondary node works well=EF=BC=89, primary vm and= secondary vm is same=EF=BC=8C that means the existing > tcp connection has the same sequence=E3=80=82 >=20 > >>> new connections made by what is now the primary dont need to = do anything > >>> special. > Yes, you are right. I wonder whether we need to do something special to the new-secondary; consider this: 1 primary (P1) & secondary (S1) run together 2 New connection opened 3 secondary records an offset 4 5 primary (P1) fails; do failover to secondary 6 secondary (S1) still rewrites sequence for connection opened at (2) 7 Start new-secondary (S2), send checkpoint from S1->S2 8 S2 has same guest contents as S1; so the sequence numbers are still offset compared to the outside world. So S2 needs to be sent the offsets for existing connections, otherwise is S1 was then to fail, S2 would send the wrong output on the existing connection? Dave =20 >=20 >=20 > >Hailiang or Zhijian can answer this question. >=20 >=20 > Thanks > Li Zhijian >=20 >=20 -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK