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

Re: [libvirt] [PATCH] Don't replace persistent domain config with migrated config



On 03/24/2010 08:52 AM, Jiri Denemark wrote:
> When a domain is defined on host1, migrated to host2 and then migrated
> back to host1, its current configuration would overwrite the libvirtd's
> in-memory copy of persistent configuration of that domain. This is not
> desired as we want to preserve the persistent configuration untouched.
> 
> This patch introduces new 'live' parameter to virDomainAssignDef.
> Passing 'true' for 'live' means the configuration passed to
> virDomainAssignDef describes a configuration of live instance of the
> domain. This applies for saved domains which are being restored or for
> incoming domains during migration.

ACK.

> 
>  virDomainObjPtr virDomainAssignDef(virCapsPtr caps,
...

>          } else {
> -            if (domain->newDef)
> -                virDomainDefFree(domain->newDef);
> +            virDomainDefFree(domain->newDef);

And nice removal of useless-if-before-free.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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