On Mon, Jun 11, 2018 at 1:42 AM, Zhang Chen <zhangc...@gmail.com> wrote:
> > > On Tue, Jun 5, 2018 at 6:23 AM, Eric Blake <ebl...@redhat.com> wrote: > >> On 06/03/2018 12:05 AM, Zhang Chen wrote: >> >>> Libvirt or other high level software can use this command query colo >>> status. >>> You can test this command like that: >>> {'execute':'query-colo-status'} >>> >>> Signed-off-by: Zhang Chen <zhangc...@gmail.com> >>> --- >>> >> >> +++ b/qapi/migration.json >>> @@ -1231,6 +1231,40 @@ >>> ## >>> { 'command': 'xen-colo-do-checkpoint' } >>> +## >>> +# @COLOStatus: >>> +# >>> +# The result format for 'query-colo-status'. >>> +# >>> +# @mode: COLO running mode. If COLO is running, this field will return >>> +# 'primary' or 'secodary'. >>> >> >> s/secodary/secondary/ >> >> +# >>> +# @colo-running: true if COLO is running. >>> +# >>> +# @reason: describes the reason for the COLO exit. >>> +# >>> +# Since: 2.13 >>> >> >> 3.0 >> >> +## >>> +{ 'struct': 'COLOStatus', >>> + 'data': { 'mode': 'COLOMode', 'colo-running': 'bool', 'reason': >>> 'COLOExitReason' } } >>> + >>> +## >>> +# @query-colo-status: >>> +# >>> +# Query COLO status while the vm is running. >>> +# >>> +# Returns: A @COLOStatus object showing the status. >>> +# >>> +# Example: >>> +# >>> +# -> { "execute": "query-colo-status" } >>> +# <- { "return": { "mode": "primary", "colo-running": true, "reason": >>> "request" } } >>> +# >>> +# Since: 2.13 >>> >> >> 3.0 > > > Oh, I can't see the new Qemu plan... > Typo: Sorry, I just forgot to see the new plan.... > > Thank you for the reminder. > Zhang Chen > > > >> >> >> +## >>> +{ 'command': 'query-colo-status', >>> + 'returns': 'COLOStatus' } >>> + >>> ## >>> # @migrate-recover: >>> # >>> >>> >> -- >> Eric Blake, Principal Software Engineer >> Red Hat, Inc. +1-919-301-3266 >> Virtualization: qemu.org | libvirt.org >> > >