|
|
4a2fec |
From ca573248c7d3e8070722316b168f94b79fd75357 Mon Sep 17 00:00:00 2001
|
|
|
4a2fec |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
4a2fec |
Date: Wed, 25 Oct 2017 18:28:36 +0200
|
|
|
4a2fec |
Subject: [PATCH 17/19] migrate: HMP migate_continue
|
|
|
4a2fec |
|
|
|
4a2fec |
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4a2fec |
Message-id: <20171025182838.31829-6-dgilbert@redhat.com>
|
|
|
4a2fec |
Patchwork-id: 77440
|
|
|
4a2fec |
O-Subject: [RHV-7.5 qemu-kvm-rhev PATCH 5/7] migrate: HMP migate_continue
|
|
|
4a2fec |
Bugzilla: 1497120
|
|
|
4a2fec |
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Juan Quintela <quintela@redhat.com>
|
|
|
4a2fec |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
4a2fec |
|
|
|
4a2fec |
HMP equivalent to the just added migrate-continue
|
|
|
4a2fec |
Unpause a migrate paused at a given state.
|
|
|
4a2fec |
|
|
|
4a2fec |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4a2fec |
Reviewed-by: Peter Xu <peterx@redhat.com>
|
|
|
4a2fec |
Reviewed-by: Juan Quintela <quintela@redhat.com>
|
|
|
4a2fec |
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
|
4a2fec |
(cherry picked from commit 94ae12cba4f18253e3cf5f9a70335e22870053b4)
|
|
|
4a2fec |
Conflict:
|
|
|
4a2fec |
Change in qapi_enum_parse parameters
|
|
|
4a2fec |
|
|
|
4a2fec |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
4a2fec |
---
|
|
|
4a2fec |
hmp-commands.hx | 12 ++++++++++++
|
|
|
4a2fec |
hmp.c | 14 ++++++++++++++
|
|
|
4a2fec |
hmp.h | 1 +
|
|
|
4a2fec |
3 files changed, 27 insertions(+)
|
|
|
4a2fec |
|
|
|
4a2fec |
diff --git a/hmp-commands.hx b/hmp-commands.hx
|
|
|
4a2fec |
index 5b4cf6b..c16d270 100644
|
|
|
4a2fec |
--- a/hmp-commands.hx
|
|
|
4a2fec |
+++ b/hmp-commands.hx
|
|
|
4a2fec |
@@ -979,7 +979,19 @@ STEXI
|
|
|
4a2fec |
@item migrate_cancel
|
|
|
4a2fec |
@findex migrate_cancel
|
|
|
4a2fec |
Cancel the current VM migration.
|
|
|
4a2fec |
+ETEXI
|
|
|
4a2fec |
|
|
|
4a2fec |
+ {
|
|
|
4a2fec |
+ .name = "migrate_continue",
|
|
|
4a2fec |
+ .args_type = "state:s",
|
|
|
4a2fec |
+ .params = "state",
|
|
|
4a2fec |
+ .help = "Continue migration from the given paused state",
|
|
|
4a2fec |
+ .cmd = hmp_migrate_continue,
|
|
|
4a2fec |
+ },
|
|
|
4a2fec |
+STEXI
|
|
|
4a2fec |
+@item migrate_continue @var{state}
|
|
|
4a2fec |
+@findex migrate_continue
|
|
|
4a2fec |
+Continue migration from the paused state @var{state}
|
|
|
4a2fec |
ETEXI
|
|
|
4a2fec |
|
|
|
4a2fec |
{
|
|
|
4a2fec |
diff --git a/hmp.c b/hmp.c
|
|
|
4a2fec |
index 5b6eeba..261c17b 100644
|
|
|
4a2fec |
--- a/hmp.c
|
|
|
4a2fec |
+++ b/hmp.c
|
|
|
4a2fec |
@@ -1493,6 +1493,20 @@ void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
|
|
|
4a2fec |
qmp_migrate_cancel(NULL);
|
|
|
4a2fec |
}
|
|
|
4a2fec |
|
|
|
4a2fec |
+void hmp_migrate_continue(Monitor *mon, const QDict *qdict)
|
|
|
4a2fec |
+{
|
|
|
4a2fec |
+ Error *err = NULL;
|
|
|
4a2fec |
+ const char *state = qdict_get_str(qdict, "state");
|
|
|
4a2fec |
+ int val = qapi_enum_parse(MigrationStatus_lookup, state,
|
|
|
4a2fec |
+ MIGRATION_STATUS__MAX, -1, &err;;
|
|
|
4a2fec |
+
|
|
|
4a2fec |
+ if (val >= 0) {
|
|
|
4a2fec |
+ qmp_migrate_continue(val, &err;;
|
|
|
4a2fec |
+ }
|
|
|
4a2fec |
+
|
|
|
4a2fec |
+ hmp_handle_error(mon, &err;;
|
|
|
4a2fec |
+}
|
|
|
4a2fec |
+
|
|
|
4a2fec |
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict)
|
|
|
4a2fec |
{
|
|
|
4a2fec |
Error *err = NULL;
|
|
|
4a2fec |
diff --git a/hmp.h b/hmp.h
|
|
|
4a2fec |
index 8d9cb29..8dc865d 100644
|
|
|
4a2fec |
--- a/hmp.h
|
|
|
4a2fec |
+++ b/hmp.h
|
|
|
4a2fec |
@@ -68,6 +68,7 @@ void hmp_savevm(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
void hmp_delvm(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
void hmp_info_snapshots(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
+void hmp_migrate_continue(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
|
|
|
4a2fec |
--
|
|
|
4a2fec |
1.8.3.1
|
|
|
4a2fec |
|