From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNVO8-0003xE-D6 for qemu-devel@nongnu.org; Mon, 16 Feb 2015 18:47:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNVO1-00036A-L6 for qemu-devel@nongnu.org; Mon, 16 Feb 2015 18:47:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNVO1-000360-ED for qemu-devel@nongnu.org; Mon, 16 Feb 2015 18:47:33 -0500 Message-ID: <54E2818C.4000800@redhat.com> Date: Mon, 16 Feb 2015 16:47:24 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423711034-5340-1-git-send-email-zhang.zhanghailiang@huawei.com> <1423711034-5340-15-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1423711034-5340-15-git-send-email-zhang.zhanghailiang@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rlmR9WmjhCb2I500DoOLR1PFQ0SvrunxQ" Subject: Re: [Qemu-devel] [PATCH RFC v3 14/27] COLO failover: Introduce a new command to trigger a failover List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang , qemu-devel@nongnu.org Cc: Lai Jiangshan , Li Zhijian , yunhong.jiang@intel.com, eddie.dong@intel.com, dgilbert@redhat.com, peter.huangpeng@huawei.com, stefanha@redhat.com, pbonzini@redhat.com, Yang Hongyang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rlmR9WmjhCb2I500DoOLR1PFQ0SvrunxQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/11/2015 08:17 PM, zhanghailiang wrote: > We leave users to use whatever heartbeat solution they want, if the hea= rtbeat > is lost, or other errors they detect, they can use command > 'colo_lost_heartbeat' to tell COLO to do failover, COLO will do operati= ons > accordingly. >=20 > For example, > If send the command to PVM, Primary will exit COLO mode, and takeover, > if to Secondary, Secondary will do failover work and at last takeover s= erver. >=20 > Signed-off-by: zhanghailiang > Signed-off-by: Li Zhijian > Signed-off-by: Lai Jiangshan > Signed-off-by: Yang Hongyang > --- > hmp-commands.hx | 15 ++++++++++++++ > hmp.c | 7 +++++++ > hmp.h | 1 + > include/migration/migration-colo.h | 1 + > include/migration/migration-failover.h | 20 ++++++++++++++++++ > migration/Makefile.objs | 2 +- > migration/colo-failover.c | 38 ++++++++++++++++++++++++++= ++++++++ > migration/colo.c | 1 + > qapi-schema.json | 9 ++++++++ > qmp-commands.hx | 19 +++++++++++++++++ > stubs/migration-colo.c | 8 +++++++ > 11 files changed, 120 insertions(+), 1 deletion(-) > create mode 100644 include/migration/migration-failover.h > create mode 100644 migration/colo-failover.c >=20 > diff --git a/hmp-commands.hx b/hmp-commands.hx > +++ b/qapi-schema.json > @@ -543,6 +543,15 @@ > { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCap= abilityStatus']} > =20 > ## > +# @colo-lost-heartbeat > +# > +# Tell COLO that heartbeat is lost > +# > +# Since: 2.3 > +## > +{ 'command': 'colo-lost-heartbeat' } Okay... > + > +## > # @MouseInfo: > # > # Information about a mouse device. > diff --git a/qmp-commands.hx b/qmp-commands.hx > index a85d847..1b4a5ca 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -753,6 +753,25 @@ Example: > EQMP > =20 > { > + .name =3D "colo_lost_heartbeat", =2E..but documented incorrectly (this should use '-' to match the command= name in the .json file, not '_') > + .args_type =3D "", > + .mhandler.cmd_new =3D qmp_marshal_input_colo_lost_heartbeat, > + }, > + > +SQMP > +colo_lost_heartbeat > +-------------------- > + > +Tell COLO that heartbeat is lost, a failover or takeover is needed. > + > +Example: > + > +-> { "execute": "colo_lost_heartbeat" } > +<- { "return": {} } This example won't work unless you fix the spelling. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --rlmR9WmjhCb2I500DoOLR1PFQ0SvrunxQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU4oGNAAoJEKeha0olJ0Nq/DwH/0V1E8KXtyqFJoMDJM2yxoA/ Piuzbvr8GwAS2NnFpzp1AyE0fA7YljDDD3P5ct3/bBM6OAXoTk7oOVPFmEbWM5XF Wlg/aW1Hr2FlDuItAOwIU6+wdW/id6hEt5rHahCWhk45b/RS1bKO4HmOvKR0CoS+ bzjM/BPogXTAod+F8LNnuUZXyfXpwro9byC8MwXdQDDU6jLSAdsVMLZ8mwJTnkdT rPsv0ncdQs5gUzRiMh8YiyYehjeyBHt0G2rnxz+WZrfkGRnvbZt5FsNXuZXx1hNc UZYfggNmuqec7S7zYBAhMowEQ30Bj0CMyWHsXj3ti0kzLL5jG23UhIWvoMvi9vA= =JdXG -----END PGP SIGNATURE----- --rlmR9WmjhCb2I500DoOLR1PFQ0SvrunxQ--