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

Re: [Xen-API] Xen-Api -Retrieving the Xen master node IP using Xen API



> Hi ,
> I am working on a backup application . Our solution works fine for a single 
> Xen host . But on A Xen Pool Configuration, session() call works only for the 
> master , Is there any call to retrieve the IP of the master when we are 
> working with the slave nodes ,so that a
> redirection can be made to that obtained master IP when slave node is 
> enquired for backup .

> Thank you
> Shafi Mohammed 

Hi Shafi,

If you attempt to make an API call to a slave (even something trivial like 
pool.get_all()), you'll get the HOST_IS_SLAVE exception, along with the 
master's IP address.

Here's the (C#) code XenCenter uses to extract the IP address from the 
exception:

https://github.com/xenserver/xenadmin/blob/da00b13bb94603b369b873b0a555d44f15fa0ca5/XenAdmin/Network/XenConnectionUI.cs#L117

Hope this helps,
John

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.