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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org