[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] QMP: Introduce MIGRATION events
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] QMP: Introduce MIGRATION events |
Date: |
Tue, 25 May 2010 10:09:55 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0 |
On 05/25/2010 09:21 AM, Juan Quintela wrote:
They are emitted when migration starts, ends, has a failure or is canceled.
Signed-off-by: Juan Quintela<address@hidden>
---
QMP/qmp-events.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
monitor.c | 12 ++++++++++++
monitor.h | 4 ++++
3 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
index 01ec85f..93caa4d 100644
--- a/QMP/qmp-events.txt
+++ b/QMP/qmp-events.txt
@@ -26,6 +26,56 @@ Example:
Note: If action is "stop", a STOP event will eventually follow the
BLOCK_IO_ERROR event.
+MIGRATION_CANCELED
+------------------
+
+Emitted when migration is canceled. This is emitted in the source.
+Target will emit MIGRATION_FAILED (no way to differentiate a FAILED
+and CANCELED migration for target).
But the management tool is the one that cancels so surely, it knows why
already.
+Data: None
+
+Example:
+
+{ "event": "MIGRATION_CANCELED",
+ "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
+
+MIGRATION_ENDED
+---------------
+
+Emitted when migration ends (both in source and target)
A start event is going to be generated already, no?
+Data: None
+
+Example:
+
+{ "event": "MIGRATION_ENDED",
+ "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
+
+MIGRATION_FAILED
+----------------
+
+Emitted when migration fails (both is source and target).
+
+Data: None
There should be some information about why it failed, no? Preferrably in
a QError format.
+Example:
+
+{ "event": "MIGRATION_FAILED",
+ "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
+
+MIGRATION_STARTED
+-----------------
+
+Emitted when migration starts (both in source and target).
I think this makes more sense as a MIGRATION_CONNECTED event. It
probably should carry peer information too.
Regards,
Anthony Liguori
+Data: None
+
+Example:
+
+{ "event": "MIGRATION_STARTED",
+ "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
+
RESET
-----
diff --git a/monitor.c b/monitor.c
index ad50f12..5158780 100644
--- a/monitor.c
+++ b/monitor.c
@@ -444,6 +444,18 @@ void monitor_protocol_event(MonitorEvent event, QObject
*data)
case QEVENT_WATCHDOG:
event_name = "WATCHDOG";
break;
+ case QEVENT_MIGRATION_STARTED:
+ event_name = "MIGRATION_STARTED";
+ break;
+ case QEVENT_MIGRATION_ENDED:
+ event_name = "MIGRATION_ENDED";
+ break;
+ case QEVENT_MIGRATION_FAILED:
+ event_name = "MIGRATION_FAILED";
+ break;
+ case QEVENT_MIGRATION_CANCELED:
+ event_name = "MIGRATION_CANCELED";
+ break;
default:
abort();
break;
diff --git a/monitor.h b/monitor.h
index ea15469..34bcd38 100644
--- a/monitor.h
+++ b/monitor.h
@@ -28,6 +28,10 @@ typedef enum MonitorEvent {
QEVENT_BLOCK_IO_ERROR,
QEVENT_RTC_CHANGE,
QEVENT_WATCHDOG,
+ QEVENT_MIGRATION_STARTED,
+ QEVENT_MIGRATION_ENDED,
+ QEVENT_MIGRATION_FAILED,
+ QEVENT_MIGRATION_CANCELED,
QEVENT_MAX,
} MonitorEvent;
- [Qemu-devel] [PATCH v2 0/5] Add QMP migration events, Juan Quintela, 2010/05/25
- [Qemu-devel] [PATCH 2/5] Factorize common migration incoming code, Juan Quintela, 2010/05/25
- [Qemu-devel] [PATCH 3/5] QMP: Introduce MIGRATION events, Juan Quintela, 2010/05/25
- Re: [Qemu-devel] [PATCH 3/5] QMP: Introduce MIGRATION events,
Anthony Liguori <=
- [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Juan Quintela, 2010/05/25
- Re: [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Daniel P. Berrange, 2010/05/25
- [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Anthony Liguori, 2010/05/25
- Re: [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Daniel P. Berrange, 2010/05/25
- [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Juan Quintela, 2010/05/25
- [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Anthony Liguori, 2010/05/25
- [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Luiz Capitulino, 2010/05/25
- [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Juan Quintela, 2010/05/25
- Re: [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Daniel P. Berrange, 2010/05/25
- Re: [Qemu-devel] Re: [PATCH 3/5] QMP: Introduce MIGRATION events, Anthony Liguori, 2010/05/25