Re: [libvirt] Migration API broken for xenmigr://

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

 



On Thu, Jan 29, 2009 at 10:50:18PM -0500, John Levon wrote:
> 
> 2675  * Returns the new domain object if the migration was successful,
> 2676  *   or NULL in case of error.  Note that the new domain object
> 2677  *   exists in the scope of the destination connection (dconn).
> 
> This is obviously impossible for xenmigr:///. As a result, virsh migrate
> always returns  an error code:

I'm not sure I understand why this is impossible ?

You always have two virConnectPtr objects - one of the source, and
one for the destination host. The reason for the optional URI is to cope 
with the scenario where the clients view of what the destination hostname
is, has to be different from the source host's view.

eg, if a node is multi-homed, 10.0.0.1 and 192.168.1.1

Then the libvirt client might connect to source and estination
hosts with

  xen://10.0.0.1/  (source)
  xen://10.0.0.2/  (dest)


But, the source & dest may only be able to talk to each other
using 192.168.1.1/.2, so yu'd have to give a extra URI for
xenmigr://192.168.1.2/  so the source host used the correct
network address for the actual migration.
Either way, the libvirt client can get the resulting domain
object, from the destination hosts virConnectPtr instance


> # virsh migrate --live domu-220 xen:/// interpol
> 18:44:40.974: error : Domain not found: xenUnifiedDomainLookupByName
> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName
> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName
> 
> thewhip:xend # echo $?
> 1
> 
> Since virDomainLookupByName() returns NULL. I will request again, can I
> remove the 'error' code from xenUnifiedDomainLookupByName?

I'm not sure why it returns NULL there ?!?!

> More importantly, how can this be fixed? Perhaps we can return 'domain'
> instead of 'ddomain' if a migrateuri was specified? Also, where does
> 'domain' get freed in the case where 'ddomain' is returned?

The passed in 'domain' object is owned by the caller, so the caller is
responsible for free'ing it once its done using it. Likewise the returned
ddomain object should also be free'd by the caller when it no longer
requires it

Danoel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
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]