Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
libvirt.29828
f3ed5c27-libxl-dont-resume-domain-on-canceled-m...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File f3ed5c27-libxl-dont-resume-domain-on-canceled-mig.patch of Package libvirt.29828
From 35e599c4dee2ab8e7438b2cf6fcee1acc92a57b2 Mon Sep 17 00:00:00 2001 From: Jim Fehlig <jfehlig@suse.com> Date: Tue, 11 Jul 2023 10:35:32 -0600 Subject: [PATCH 1/2] libxl: Don't attempt to resume domain on canceled migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For unknown reasons, the libxl driver attempts to resume a domain in the confirm phase when a migration operation has been canceled. This has shown to be problematic when simulating scenarios that result in a canceled migration. In all scenarios, the domain was in a running state when entering libxlDomainMigrationSrcConfirm, causing the call to libxl_domain_resume to fail. Making matters worse, the domain state is changed to paused when in fact it's running. And finally, libxlDomainMigrationSrcConfirm incorrectly returns an error. Remove this incorrect logic from libxlDomainMigrationSrcConfirm. On a canceled migration it's sufficient to resume the lock process that was paused in the perform phase. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> (cherry picked from commit f3ed5c27136193c59973d17447356becd1d3eda5) --- src/libxl/libxl_migration.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) Index: libvirt-9.0.0/src/libxl/libxl_migration.c =================================================================== --- libvirt-9.0.0.orig/src/libxl/libxl_migration.c +++ libvirt-9.0.0/src/libxl/libxl_migration.c @@ -1342,7 +1342,6 @@ libxlDomainMigrationSrcConfirm(libxlDriv libxlDriverConfig *cfg = libxlDriverConfigGet(driver); libxlDomainObjPrivate *priv = vm->privateData; virObjectEvent *event = NULL; - int ret = -1; if (cancelled) { /* Resume lock process that was paused in MigrationSrcPerform */ @@ -1351,17 +1350,6 @@ libxlDomainMigrationSrcConfirm(libxlDriv vm, priv->lockState); priv->lockProcessRunning = true; - if (libxl_domain_resume(cfg->ctx, vm->def->id, 1, 0) == 0) { - ret = 0; - } else { - VIR_DEBUG("Unable to resume domain '%s' after failed migration", - vm->def->name); - virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, - VIR_DOMAIN_PAUSED_MIGRATION); - event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_SUSPENDED, - VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED); - ignore_value(virDomainObjSave(vm, driver->xmlopt, cfg->stateDir)); - } goto cleanup; } @@ -1380,12 +1368,10 @@ libxlDomainMigrationSrcConfirm(libxlDriv if (!vm->persistent || (flags & VIR_MIGRATE_UNDEFINE_SOURCE)) virDomainObjListRemove(driver->domains, vm); - ret = 0; - cleanup: /* EndJob for corresponding BeginJob in begin phase */ virDomainObjEndJob(vm); virObjectEventStateQueue(driver->domainEventState, event); virObjectUnref(cfg); - return ret; + return 0; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor