aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2018-05-02 18:47:37 +0800
committerJuan Quintela <quintela@redhat.com>2018-05-15 22:12:41 +0200
commit3b563c4be01f42d2a4e641d50736bd5ac8e3b15f (patch)
tree0af17a17b6c181a6b73ab1999a33be772a26a3da
parent02affd41b1157c511ea7fd0cc0bc61a07d9696b1 (diff)
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>
-rw-r--r--hmp-commands.hx13
-rw-r--r--hmp.c10
-rw-r--r--hmp.h1
3 files changed, 24 insertions, 0 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index a7051ee391..2fa387d341 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -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
{
diff --git a/hmp.c b/hmp.c
index a7aa878788..2a36c1cf8d 100644
--- a/hmp.c
+++ b/hmp.c
@@ -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)
{
diff --git a/hmp.h b/hmp.h
index 4e2ec375b0..b6b56c8161 100644
--- a/hmp.h
+++ b/hmp.h
@@ -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);