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