[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-API] Re: XCP / modify XCP Code ? - contribute code
- To: Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>
- From: Chonduy Nguyen <chonduy9@xxxxxxxxx>
- Date: Tue, 23 Mar 2010 13:19:57 -0700 (PDT)
- Cc: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>, "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 23 Mar 2010 13:19:50 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=0E+3p0tgsRcl49UU6WKhUKQcXhQBMjOTLeGW3xHTjnREhli1vm77KdXZ6LtTubF/AXtvbpvqKdmp3ePYc08T11yUc23YSPUQdrUcBS0SD8GnnbgdKKZTfzEKbCNJVpzd8iHKbyUTk7J2UF3aLCRFlNT0t8naDnO477f3KJ/0bFg=;
- List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
Hi all,
We are looking for option such as if there is a relocation Vms due to node is down,
could happen very quick = but since the way the current code made configuration
value host_heartbeat_interval and host_assumed_dead_interval = 200 on the file instead of config file -
I would like to seek for if there are anyway - can be improved so that relocation Vms can happen sooner - Right now whenever I call operation when the node down - the first call to restart vm at another node also long - and throw error that node can't contact - and after the first error, thing goes fastser
Another question - I want to ask that if we want to contribute any module codes ( python code)- how can we
integrate with XCP - so XCP can manage the module - and it treats as part of XCP platform - Do you allow this? or open to this?
Thank you,
ChonDuy
--- On Mon, 3/22/10, Chonduy Nguyen <chonduy9@xxxxxxxxx> wrote:
From: Chonduy Nguyen <chonduy9@xxxxxxxxx> Subject: Re: [Xen-API] Re: XCP / modify XCP Code ? To: "Jonathan Ludlam" <Jonathan.Ludlam@xxxxxxxxxxxxx> Cc: "Dave Scott" <Dave.Scott@xxxxxxxxxxxxx>, "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx> Date: Monday, March 22, 2010, 7:07 PM
Hi Jonathan,
Thanks for the info - so, if I would like to lower the value
below to be a smaller one
* Interval between host heartbeats *) let host_heartbeat_interval = 30.0 ==> want to change 10 (* If we haven't heard a heartbeat from a host for this interval then the host is assumed dead *) let host_assumed_dead_interval = 200 ==> change to 60
how can I rebuild this? given there are also other source which you said not open
I heard that people also contribute codes on XCP - there must be a way for integration code
Can you please
help?
Thanks
ChonDuy
From: Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx> To: Chonduy Nguyen <chonduy9@xxxxxxxxx> Cc: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>; "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx> Sent: Sat, March 20, 2010 3:44:46 PM Subject: Re: [Xen-API] Re: XCP / modify XCP Code ?
Hi Chonduy,
Host liveness is controlled in the Db_gc
module (xen-api.hg/ocaml/xapi/db_gc.ml). The way it works is that each pool slave is heartbeating to the master, calling every 30 seconds (This is defined in xapi_globs.ml - 'host_heartbeat_interval'). If the master hasn't heard from a slave for 200 seconds (Xapi_globs.host_assumed_dead_interval), then the host is marked as dead by setting to false the database field 'live' on the Host_metrics object.
This 'live' field is checked when a message is forwarded to the host in the Message_forwarding module (xen-api.hg/ocaml/xapi/message_forwarding.ml). If the host is thought to be dead, it immediately returns the error HOST_OFFLINE. If it's not thought to be dead, then we usually re-use an existing stunnel session that had previously been set up to talk to the host. This might take a long time to fail, but when it does it causes a 'CANNOT_CONTACT_HOST' error. Both of these errors are thrown from the Message_forwarding
module.
There are only a couple of small parts of the codebase that haven't been open-sourced, like the HA and licensing code. The Db module is actually not present in the repository as it is generated from the code living in the ocaml/idl subdirectory of xen-api.hg. The file 'ocaml/idl/datamodel.ml' contains the descriptions of both the Xen API itself and also the database backing the objects. The database is not actually a complex beast - the code that is generated is essentially an interface between the strongly typed world that most of xapi inhabits and the underlying representation of the database (currently hashtables in memory, serialised to an xml file on disk). The database is currently only in memory on the pool master, and calls to the Db module from slaves are translated into requests sent across the network. If you manage to build xapi (not an easy task!), the source of the database will be in the ocaml/autogen
dir (IIRC it's called db_actions.ml).
Hope this helps!
Jon
On 20 Mar 2010, at 01:07, Chonduy Nguyen wrote: Hi Dave
I am trying to look into XCP to see if I can make change on the code to improve of some scnerio - but it looks like
not all codes are open - May I confirm this?
I observed that when a node is down - and if my software tried
to do shutdown on VMs - it took 20 minutes for the api to return Exception - error CANNOT_CONTACT_HOST
for another call like disable_host - it takes 3 minutes to return error : CANNOT_CONTACT_HOST after the first error - it looks like the second calls - will faster with error -HOST_OFFLINE
May I ask info of Host down etc... stored on storage or memory of XCP ?
I look at the code and saw object call Db. --> what is this DB ? - is a local file or pool storage ?
Thank you,
Chonduy/TNguyen
_______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxxhttp://lists.xensource.com/mailman/listinfo/xen-api
|
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|