Re: [libvirt] [PATCH] qemu: skip precreation of network disks
On 13.03.2015 01:34, Michael Chapman wrote: Commit cf54c60699833b3791a5d0eb3eb5a1948c267f6b introduced the ability to create missing storage volumes during migration. For network disks, however, we may not necessarily be able to detect whether they already exist -- there is no straight-forward way to map the disk to a storage volume, and even if there were it's possible no configured storage pool actually contains the disk. It is better to assume the network disk exists in this case, rather than aborting the migration completely. If the volume really is missing, QEMU will generate an appropriate error later in the migration. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/qemu/qemu_migration.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 83be435..ebe8af5 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1507,9 +1507,13 @@ qemuMigrationPrecreateDisk(virConnectPtr conn, flags |= VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA; break; +case VIR_STORAGE_TYPE_NETWORK: +VIR_DEBUG(Skipping creation of network disk '%s', + disk-dst); +return 0; + case VIR_STORAGE_TYPE_BLOCK: case VIR_STORAGE_TYPE_DIR: -case VIR_STORAGE_TYPE_NETWORK: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, Yeah, I don't see a better way of handling network disks right now. ACKed and pushed. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: skip precreation of network disks
On Fri, 13 Mar 2015, Michael Chapman wrote: Commit cf54c60699833b3791a5d0eb3eb5a1948c267f6b introduced the ability to create missing storage volumes during migration. For network disks, however, we may not necessarily be able to detect whether they already exist -- there is no straight-forward way to map the disk to a storage volume, and even if there were it's possible no configured storage pool actually contains the disk. It is better to assume the network disk exists in this case, rather than aborting the migration completely. If the volume really is missing, QEMU will generate an appropriate error later in the migration. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/qemu/qemu_migration.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Ping? Looks like Noel Burton-Krahn / Nick Bartos brought up the same issue on the list today (https://www.redhat.com/archives/libvir-list/2015-March/msg00969.html). I'd be happy for either patch to go in. - Michael -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] qemu: skip precreation of network disks
Commit cf54c60699833b3791a5d0eb3eb5a1948c267f6b introduced the ability to create missing storage volumes during migration. For network disks, however, we may not necessarily be able to detect whether they already exist -- there is no straight-forward way to map the disk to a storage volume, and even if there were it's possible no configured storage pool actually contains the disk. It is better to assume the network disk exists in this case, rather than aborting the migration completely. If the volume really is missing, QEMU will generate an appropriate error later in the migration. Signed-off-by: Michael Chapman m...@very.puzzling.org --- src/qemu/qemu_migration.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 83be435..ebe8af5 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1507,9 +1507,13 @@ qemuMigrationPrecreateDisk(virConnectPtr conn, flags |= VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA; break; +case VIR_STORAGE_TYPE_NETWORK: +VIR_DEBUG(Skipping creation of network disk '%s', + disk-dst); +return 0; + case VIR_STORAGE_TYPE_BLOCK: case VIR_STORAGE_TYPE_DIR: -case VIR_STORAGE_TYPE_NETWORK: case VIR_STORAGE_TYPE_NONE: case VIR_STORAGE_TYPE_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, -- 2.1.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list