[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] qemu: add rbd to whitelist of migration-safe formats

QEMU (and librbd) flush the cache on the source before the
destination starts, and the destination does not read any
changeable data before that, so live migration with rbd caching
is safe.

This makes 'virsh migrate' work with rbd and caching without the
--unsafe flag.

Reported-by: Vladimir Bashkirtsev <vladimir bashkirtsev com>
Signed-off-by: Josh Durgin <josh durgin inktank com>
 src/qemu/qemu_migration.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 48369d6..f51c99a 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -847,6 +847,9 @@ qemuMigrationIsSafe(virDomainDefPtr def)
                 else if (cfs < 0)
                     return false;
+            } else if (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK &&
+                       disk->protocol == VIR_DOMAIN_DISK_PROTOCOL_RBD) {
+                continue;
             qemuReportError(VIR_ERR_MIGRATE_UNSAFE, "%s",

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]