Bug 1146618

Summary: virDomainMigrateSetMaxDowntime can only be called during migration
Product: [Community] Virtualization Tools Reporter: Chris St. Pierre <cstpierr>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cstpierr, jdenemar, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-30 11:36:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix the bug described none

Description Chris St. Pierre 2014-09-25 15:37:12 UTC
Created attachment 941141 [details]
Patch to fix the bug described

Description of problem:

virDomainMigrateSetMaxDowntime can only be called during migration. Since migration is blocking, this is annoying at best, as it requires spawning a separate thread to set the max downtime. It's also an unnecessary and artificial limitation; setting the max downtime directly with qemu before migration starts works fine.

Version-Release number of selected component (if applicable):

HEAD

How reproducible:

Always

Steps to Reproduce:
1. Try to set the max downtime of a domain that is not being migrated.

Actual results:

Failure.

Expected results:

Success.

Additional info:

Patch attached.

Comment 1 Jiri Denemark 2014-09-26 16:52:54 UTC
Since you already prepared the patch in git, could you please use git to send the patch to libvir-list as described at http://libvirt.org/hacking.html#patches ?

Comment 2 Jiri Denemark 2014-09-30 11:36:56 UTC
Fixed by v1.2.9-rc2-5-gfe808d9:

commit fe808d95bf353647bb39b3bc468f5a841b5588dd
Author: Chris St. Pierre <chris.a.st.pierre>
Date:   Mon Sep 29 13:45:28 2014 +0000

    Allow setting migration max downtime any time
    
    This removes the artificial and unnecessary restriction that
    virDomainSetMaxDowntime() only be called while a migration is in
    progress.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1146618
    
    Signed-off-by: Jiri Denemark <jdenemar>