SHA256
1
0
forked from pool/libvirt
libvirt/0004-libxl-don-t-attempt-to-resume-domain-when-suspend-fa.patch
James Fehlig 379397c0f7 Accepting request 320420 from home:jfehlig:branches:Virtualization
- Update to libvirt 1.2.18
  - libxl: support dom0
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
  - Dropped upstream patches:
    e44bcae-virt-aa-helper-trailing-slash.patch,
    a55a5e7-virt-aa-helper-log.patch,
    61dab0f-virt-aa-helper-renaming.patch,
    24f3c2f-virt-aa-helper-fix-caps.patch,
    45697fe5-libxl-support-dom0.patch,
    e9c27344-libxl-fix-virDomainObj-state.patch,
    4ffb21c8-libxl-dom0-state-fix.patch,
    qemu-nbd-cleanup-fix.patch

OBS-URL: https://build.opensuse.org/request/show/320420
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=475
2015-08-04 15:13:51 +00:00

52 lines
2.0 KiB
Diff

From 13d53b7763d3d93339cc33a19845bdd623524b81 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Thu, 16 Jul 2015 14:51:31 -0600
Subject: libxl: don't attempt to resume domain when suspend fails
Failure of libxl_domain_suspend() does not leave the domain in
a suspended state, so no need to call libxl_domain_resume(),
which btw will fail with "domain not suspended".
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/libxl/libxl_migration.c | 14 --------------
1 file changed, 14 deletions(-)
Index: libvirt-1.2.18/src/libxl/libxl_migration.c
===================================================================
--- libvirt-1.2.18.orig/src/libxl/libxl_migration.c
+++ libvirt-1.2.18/src/libxl/libxl_migration.c
@@ -178,7 +178,6 @@ libxlDoMigrateSend(libxlDriverPrivatePtr
int sockfd)
{
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
- virObjectEventPtr event = NULL;
int xl_flags = 0;
int ret;
@@ -188,24 +187,11 @@ libxlDoMigrateSend(libxlDriverPrivatePtr
ret = libxl_domain_suspend(cfg->ctx, vm->def->id, sockfd,
xl_flags, NULL);
if (ret != 0) {
- /* attempt to resume the domain on failure */
- if (libxl_domain_resume(cfg->ctx, vm->def->id, 1, 0) != 0) {
- VIR_DEBUG("Failed to resume domain following failed migration");
- virDomainObjSetState(vm, VIR_DOMAIN_PAUSED,
- VIR_DOMAIN_PAUSED_MIGRATION);
- event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_SUSPENDED,
- VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED);
- ignore_value(virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm));
- }
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Failed to send migration data to destination host"));
ret = -1;
- goto cleanup;
}
- cleanup:
- if (event)
- libxlDomainEventQueue(driver, event);
virObjectUnref(cfg);
return ret;
}