From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUmIw-0001DT-Qo for qemu-devel@nongnu.org; Sun, 08 Mar 2015 21:16:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUmIt-0005nl-LE for qemu-devel@nongnu.org; Sun, 08 Mar 2015 21:16:22 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:50997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUmIs-0005ma-RJ for qemu-devel@nongnu.org; Sun, 08 Mar 2015 21:16:19 -0400 Message-ID: <54FCF44D.603@huawei.com> Date: Mon, 9 Mar 2015 09:15:57 +0800 From: zhanghailiang 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> <54E2818C.4000800@redhat.com> <54ED7412.9000302@huawei.com> <54F9D17C.2010307@redhat.com> In-Reply-To: <54F9D17C.2010307@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit 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: Eric Blake , qemu-devel@nongnu.org Cc: hangaohuai@huawei.com, Lai Jiangshan , Li Zhijian , yunhong.jiang@intel.com, eddie.dong@intel.com, peter.huangpeng@huawei.com, dgilbert@redhat.com, stefanha@redhat.com, pbonzini@redhat.com, Yang Hongyang On 2015/3/7 0:10, Eric Blake wrote: > On 02/25/2015 12:04 AM, zhanghailiang wrote: > >>>> +++ b/qmp-commands.hx >>>> @@ -753,6 +753,25 @@ Example: >>>> EQMP >>>> >>>> { >>>> + .name = "colo_lost_heartbeat", >>> >>> ...but documented incorrectly (this should use '-' to match the command >>> name in the .json file, not '_') >>> >> >> Er, yes, you are right, here it should be 'colo-lost-heartbeat' in >> qmp-commands.hx, >> but 'colo_lost_heartbeat' in hmp-commands.hx, it is a little confused >> for me, >> why it should be like this? > > Historical madness. HMP has traditionally used '_' (and relied on > tab-completion to allow users to skip having to use the shift key), > while QMP has traditionally used '-' (in all but the oldest interfaces). > Got it. >> >> i will fix it. >> >>>> + .args_type = "", >>>> + .mhandler.cmd_new = 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. >>> >> >> Should here also be changed to 'colo-lost-heartbeat' ? > > Yes. > OK, thanks.