From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0kD4-0003cl-F9 for qemu-devel@nongnu.org; Mon, 23 Nov 2015 01:02:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0kD1-0007vh-89 for qemu-devel@nongnu.org; Mon, 23 Nov 2015 01:02:42 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:28172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0kD0-0007va-Jt for qemu-devel@nongnu.org; Mon, 23 Nov 2015 01:02:39 -0500 References: <1446551816-15768-1-git-send-email-zhang.zhanghailiang@huawei.com> <1446551816-15768-24-git-send-email-zhang.zhanghailiang@huawei.com> <564F9592.7000200@redhat.com> From: zhanghailiang Message-ID: <5652ABC0.4030903@huawei.com> Date: Mon, 23 Nov 2015 14:01:36 +0800 MIME-Version: 1.0 In-Reply-To: <564F9592.7000200@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH COLO-Frame v10 23/38] qmp event: Add event notification for COLO error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: lizhijian@cn.fujitsu.com, quintela@redhat.com, Markus Armbruster , yunhong.jiang@intel.com, eddie.dong@intel.com, peter.huangpeng@huawei.com, dgilbert@redhat.com, arei.gonglei@huawei.com, stefanha@redhat.com, amit.shah@redhat.com, Michael Roth On 2015/11/21 5:50, Eric Blake wrote: > On 11/03/2015 04:56 AM, zhanghailiang wrote: >> If some errors happen during VM's COLO FT stage, it's important to notify the users >> of this event. Together with 'colo_lost_heartbeat', users can intervene in COLO's >> failover work immediately. >> If users don't want to get involved in COLO's failover verdict, >> it is still necessary to notify users that we exit COLO mode. > > s/exit/exited/ > >> >> Cc: Markus Armbruster >> Cc: Michael Roth >> Signed-off-by: zhanghailiang >> Signed-off-by: Li Zhijian >> --- >> docs/qmp-events.txt | 17 +++++++++++++++++ >> migration/colo.c | 13 +++++++++++++ >> qapi-schema.json | 16 ++++++++++++++++ >> qapi/event.json | 17 +++++++++++++++++ >> 4 files changed, 63 insertions(+) >> >> diff --git a/docs/qmp-events.txt b/docs/qmp-events.txt >> index d2f1ce4..165dd76 100644 >> --- a/docs/qmp-events.txt >> +++ b/docs/qmp-events.txt >> @@ -184,6 +184,23 @@ Example: >> Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR >> event. >> >> +COLO_EXIT >> +--------- >> + >> +Emitted when VM finishes COLO mode due to some errors happening or >> +the request of users. > > s/the/at the/ > > >> +++ b/qapi-schema.json >> @@ -751,6 +751,22 @@ >> 'data': [ 'unknown', 'primary', 'secondary'] } >> >> ## >> +# @COLOExitReason >> +# >> +# The reason of COLO exit > > s/of/for a/ > >> +# >> +# @unknow: unknown reason > > s/unknow/unknown/ > >> +# >> +# @request: COLO exit is due to an external request >> +# >> +# @error: COLO exit is due to an internal error >> +# >> +# Since: 2.5 > > 2.6 (but you already know that throughout the series, so I'll quit > pointing it out) > > >> +++ b/qapi/event.json >> @@ -255,6 +255,23 @@ >> 'data': {'status': 'MigrationStatus'}} >> >> ## >> +# @COLO_EXIT >> +# >> +# Emitted when VM finishes COLO mode due to some errors happening or >> +# the request of users. > > s/the/at the/ > >> +# >> +# @mode: @COLOMode describing which side of VM is exit. > > Maybe: > > @mode: Which COLO mode the VM was in when it exited. > >> +# >> +# @reason: @COLOExitReason describing the reason of colo exit. > > @reason: describes the reason for the COLO exit. > >> +# >> +# @error: #optional, error message. Only present on error happening. >> +# >> +# Since: 2.5 >> +## >> +{ 'event': 'COLO_EXIT', >> + 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason', '*error': 'str' } } > > Other than typos, the interface seems okay. > OK, i will fix them in next version, thanks.