Re: [PATCH 2/2] qemu: Forbid migration of machines with I/O errors

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

 



On 11.06.2013 11:49, Peter Krempa wrote:
> Such machine can't be successuflly migrated unles the I/O error has
> recovered and might lead to data corruption. Forbid this kind of
> migration.
> ---
>  src/qemu/qemu_migration.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 8e57521..97daaa0 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -1423,6 +1423,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm,
>                         virDomainDefPtr def, bool remote)
>  {
>      int nsnapshots;
> +    int pauseReason;
>      bool forbid;
>      int i;
> 
> @@ -1445,6 +1446,15 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm,
>                                 nsnapshots);
>                  return false;
>              }
> +
> +            /* cancel migration if disk I/O error is emitted while migrating */
> +            if (virDomainObjGetState(vm, &pauseReason) == VIR_DOMAIN_PAUSED &&
> +                pauseReason == VIR_DOMAIN_PAUSED_IOERROR) {
> +                virReportError(VIR_ERR_OPERATION_INVALID, "%s",
> +                               _("cannot migrate domain with I/O error"));
> +                return false;
> +            }
> +
>          }
> 
>          if (virDomainHasDiskMirror(vm)) {
> 

Do we want to document this behaviour change?

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]