hmp/migration: add migrate_recover command

Sister command to migrate-recover in QMP.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180502104740.12123-22-peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Peter Xu 2018-05-02 18:47:37 +08:00 committed by Juan Quintela
parent 02affd41b1
commit 3b563c4be0
3 changed files with 24 additions and 0 deletions

View File

@ -957,7 +957,20 @@ STEXI
@findex migrate_incoming
Continue an incoming migration using the @var{uri} (that has the same syntax
as the -incoming option).
ETEXI
{
.name = "migrate_recover",
.args_type = "uri:s",
.params = "uri",
.help = "Continue a paused incoming postcopy migration",
.cmd = hmp_migrate_recover,
},
STEXI
@item migrate_recover @var{uri}
@findex migrate_recover
Continue a paused incoming postcopy migration using the @var{uri}.
ETEXI
{

10
hmp.c
View File

@ -1517,6 +1517,16 @@ void hmp_migrate_incoming(Monitor *mon, const QDict *qdict)
hmp_handle_error(mon, &err);
}
void hmp_migrate_recover(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
const char *uri = qdict_get_str(qdict, "uri");
qmp_migrate_recover(uri, &err);
hmp_handle_error(mon, &err);
}
/* Kept for backwards compatibility */
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict)
{

1
hmp.h
View File

@ -68,6 +68,7 @@ void hmp_info_snapshots(Monitor *mon, const QDict *qdict);
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
void hmp_migrate_continue(Monitor *mon, const QDict *qdict);
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
void hmp_migrate_recover(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);