]> xenbits.xensource.com Git - xcp/xen-api-libs.git/log
xcp/xen-api-libs.git
15 years agoTests the allocator using the Kaputt framework.
Matthias Goergens [Tue, 2 Feb 2010 16:43:42 +0000 (16:43 +0000)]
Tests the allocator using the Kaputt framework.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com> (Mercurial doesn't like Umlaute.)
15 years agoAdds `join' to the Opt module
Matthias Goergens [Tue, 2 Feb 2010 16:07:11 +0000 (16:07 +0000)]
Adds `join' to the Opt module

`join' collapses (Some (Some a)) down to (Some a), and gives Nothing otherwise.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
15 years agoAdds take and tails to our extended list module
Matthias Goergens [Tue, 2 Feb 2010 16:00:16 +0000 (16:00 +0000)]
Adds take and tails to our extended list module

`take' gives the first n elements of a list (or less if the list is
shorter).  `tails' gives a list of all suffixes of a list.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
15 years agoModule Fun gets operators for function composition and application.
Matthias Goergens [Tue, 2 Feb 2010 15:42:13 +0000 (15:42 +0000)]
Module Fun gets operators for function composition and application.

Exposes function composition (++) and function composition with two
arguments (+++) to the Fun module of our extended standard library.
Adds and exposes function application ($).

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
15 years agoAdding extensions to some modules in the extended standard library:
Matthias Goergens [Tue, 26 Jan 2010 15:01:01 +0000 (15:01 +0000)]
Adding extensions to some modules in the extended standard library:
- to the Map module
- to the List module
- and some functional combinators (like compose with (++)) in Fun module

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
15 years agoFix a bug in LV resizing
Jonathan Ludlam [Tue, 26 Jan 2010 15:15:05 +0000 (15:15 +0000)]
Fix a bug in LV resizing

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoAdd rpc-light support to MLVM to allow it to marshal its data structures as an RPC.t
Jonathan Ludlam [Mon, 18 Jan 2010 14:59:40 +0000 (14:59 +0000)]
Add rpc-light support to MLVM to allow it to marshal its data structures as an RPC.t

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoAdd (string,t) Hashtbl.t support to rpc-light
Jonathan Ludlam [Mon, 18 Jan 2010 14:59:40 +0000 (14:59 +0000)]
Add (string,t) Hashtbl.t support to rpc-light

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoCA-35920: add hypercall simulator support for SCHEDOP_remote_shutdown
David Scott [Thu, 4 Feb 2010 22:29:53 +0000 (22:29 +0000)]
CA-35920: add hypercall simulator support for SCHEDOP_remote_shutdown

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-36554: call setsid() before exec() to make sure children don't accidentally kill...
David Scott [Wed, 3 Feb 2010 22:33:21 +0000 (22:33 +0000)]
CA-36554: call setsid() before exec() to make sure children don't accidentally kill us when they (eg) send their entire process group a SIGQUIT.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-36554: improve the logging around the fork/exec daemon.
David Scott [Wed, 3 Feb 2010 22:33:20 +0000 (22:33 +0000)]
CA-36554: improve the logging around the fork/exec daemon.

Switch from a buffer to a list of strings, one entry prepended on every 'debug' invocation. In the error path, walk the reversed list and dump each string separately to syslog.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[ocamldoc] Ensure 'make doc' works with mlvm lib
Rob Hoes [Fri, 15 Jan 2010 12:02:55 +0000 (12:02 +0000)]
[ocamldoc] Ensure 'make doc' works with mlvm lib

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoFix camldm after renaming of jsonrpc to rpc-light.json. Also add a datatype maybe...
Jonathan Ludlam [Fri, 15 Jan 2010 12:02:42 +0000 (12:02 +0000)]
Fix camldm after renaming of jsonrpc to rpc-light.json. Also add a datatype maybe needed for rpc-light

Signed-off-by: Jonathan Ludlam <Jonathan.Ludlam@eu.citrix.com>
Acked-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[http-svr] parse the content-type of the request and store that information in the...
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[http-svr] parse the content-type of the request and store that information in the request structure

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years agoAdd a method to trigger a sleep button push in a domain
Paul Durrant [Tue, 5 Jan 2010 17:03:49 +0000 (17:03 +0000)]
Add a method to trigger a sleep button push in a domain

Signed-off-by: Paul Durrant <paul.durrant@eu.citrix.com>
15 years agoAdd a method to trigger a power button push in a domain
Paul Durrant [Tue, 22 Dec 2009 16:22:25 +0000 (16:22 +0000)]
Add a method to trigger a power button push in a domain

signed-off-by: Paul Durrant <paul.durrant@citrix.com>

15 years ago[rpc-light] In xmlrpc, when waiting for a tag opening, do not pay attention to any DTD
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] In xmlrpc, when waiting for a tag opening, do not pay attention to any DTD

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] when (un)marshaling variant, if it has no arguments then consider it...
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] when (un)marshaling variant, if it has no arguments then consider it as a string.

This bit is also necessary to discuss with the SM backend.
Basically, if you have 'type t = Foo | Bar of int with rpc' you will consider than the value Foo is actually the same thing as the string "Foo" (if you don't want to have a capital letter, use polymorphic variants as 'type t = [ `foo | `bar of int ]' which will give that the value `foo will be considered as the string "foo").

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Optimize the way (string * t) list are marshaled
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Optimize the way (string * t) list are marshaled

This bit is necessary to discuss with the SM backend and it is also a nice optiomization. Basically, if you have: 'type t = (kk, vv) list with rpc' the library will check if value of type 'kk' are marshaled to a string; if yes, instead of having a list of stuff, it creates a dictionary which is what the python XenAPI bindings are looking for.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Protect the XML strings as xml-light2.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Protect the XML strings as xml-light2.

xmlrpc converts '>' to '&gt', '<' to '&lt', '"' to '&quot' and do not erase weird characters (need to use a proper unicode validation functions at one point)

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] XMLRPC fault need to be parsed correctly
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] XMLRPC fault need to be parsed correctly

Moreover, in case of complex return value v when we have an error, apply the xapi policy which is to create a structure { Status : Failure; ErrorDescription : v }. When unmarshalling the XMLRPC, if we got { Status : Success; Value: v }, then it is equivalent to v. This is sufficiently flexible to discuss with the SM backend and xapi (which have different conventions).

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Do not wait for an optional field when unparsing an {JSON,XML}RPC.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Do not wait for an optional field when unparsing an {JSON,XML}RPC.

If you have:
type t = { foo : int option; bar : string } with rpc

It is allright to do not have the foo field if its value is None

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Never call 'exit i' on error, because that's not good when you run it...
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Never call 'exit i' on error, because that's not good when you run it in a daemon

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Fix-up some bugs in the XML parser code
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Fix-up some bugs in the XML parser code

Also add some tests to check that the library can understand what the SM backend is saying

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Add some friendly error messages on runtime errors
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Add some friendly error messages on runtime errors

This patch defines an exception 'Parse_error of (string * string * input)' when;
- the 1st string is the symbol the parser got
- the 2nd string is the symbol the parser was waiting for

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Add a function to marshal and unmarshal XMLRPC to a bigbuffer
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Add a function to marshal and unmarshal XMLRPC to a bigbuffer

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Add some basic RPC int functions.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Add some basic RPC int functions.

This patch adds rpc_of_unit and unit_of_rpc

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Add some basic RPC int functions.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Add some basic RPC int functions.

This patch adds rpc_of_{int,int32,int64} and {int,int32,int64}_of_rpc

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Add some explicit runtime exceptions when an runtime error occurs.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Add some explicit runtime exceptions when an runtime error occurs.

A friendly error message is displayed as well if Rpc.set_debug true is called before.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Add a function to parse XMLRPC from an input channel.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Add a function to parse XMLRPC from an input channel.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] test (un)marshalling of phatom types.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] test (un)marshalling of phatom types.

'type 'a t = string with rpc' has to work.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Backport the value library and clean-up the Makefile and the library...
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Backport the value library and clean-up the Makefile and the library building.

The value library is part of the ocaml-orm project available here: http://github.com/avsm/ocaml-orm-sqlite
This backport improves multiple points of the value library (which will be upstreamed later), like the polymorphic type variables or the type variable with module names (ie. 'type t = 'a M.tt with rpc' will work). Basically, all the types used by xapi are handles + some minor extensions as objects.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Make the abstraction layer more uniform, especially for the error handling.
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[rpc-light] Make the abstraction layer more uniform, especially for the error handling.

Indeed, XMLRPC and JSONRPC are a bit different on error handling, but abstract these minor differences away.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[stdext] Add the function Bigbuffer.append_string : Bigbuffer.t -> string -> unit
Thomas Gazagnaire [Mon, 11 Jan 2010 17:44:38 +0000 (17:44 +0000)]
[stdext] Add the function Bigbuffer.append_string : Bigbuffer.t -> string -> unit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years agoMinor ocamldoc fix.
Rob Hoes [Tue, 22 Dec 2009 15:16:05 +0000 (15:16 +0000)]
Minor ocamldoc fix.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-36092: Modifying Stunnel.connect's verify_cert argument to be tri-state.
David Scott [Tue, 22 Dec 2009 14:47:23 +0000 (14:47 +0000)]
CA-36092: Modifying Stunnel.connect's verify_cert argument to be tri-state.

The values are:
  Some true -> do verification
  Some false -> don't do verification
  None -> do verification if the file /var/xapi/verify_certificates exists

Signed-off-by: Magnus Therning <magnus.therning@eu.citrix.com>
Acked-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[ocamldoc]: attempt to tidy-up the ocamldoc comments in the forkhelpers module
David Scott [Tue, 22 Dec 2009 11:37:00 +0000 (11:37 +0000)]
[ocamldoc]: attempt to tidy-up the ocamldoc comments in the forkhelpers module

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-36084: pass an optional environment to Forkhelpers.execute_command_get_output
David Scott [Mon, 21 Dec 2009 21:34:31 +0000 (21:34 +0000)]
CA-36084: pass an optional environment to Forkhelpers.execute_command_get_output

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoMLVM library
Jon Ludlam [Mon, 21 Dec 2009 18:10:59 +0000 (18:10 +0000)]
MLVM library

This is a reimplementation of LVM in ocaml. It has had light testing, and therefore might corrupt data - use with caution! It only implements simple LVM functionality - creating/destroying/activating linear LVs (code exists for striped LVs but is untested). It also features a redo log so that LVM operation can be committed to disk in constant time.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoUse rpc-light to marshal/unmarshal camldm device-mapper tables rather than the Marsha...
Jon Ludlam [Mon, 21 Dec 2009 18:10:59 +0000 (18:10 +0000)]
Use rpc-light to marshal/unmarshal camldm device-mapper tables rather than the Marshal module

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoA few bits and pieces to support the vhd daemon
Jon Ludlam [Mon, 21 Dec 2009 18:10:58 +0000 (18:10 +0000)]
A few bits and pieces to support the vhd daemon

 * Introduce a dereferencing type to camldm so that PVs can be referenced by ID rather than by device name. This is useful for passing a device-mapper table between hosts where the physical device for a particular PV is different.
 * Implement device-mapper reload/suspend/resume so that a table can be changed without tearing down the device
 * A few more helper functions for stdext

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoCA-33440: remove some unused arguments from execute_command_get_output
David Scott [Mon, 21 Dec 2009 15:36:51 +0000 (15:36 +0000)]
CA-33440: remove some unused arguments from execute_command_get_output

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: add ocamldoc to forkhelpers.mli
David Scott [Mon, 21 Dec 2009 15:36:50 +0000 (15:36 +0000)]
CA-33440: add ocamldoc to forkhelpers.mli

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: remove some more unused functions from forkhelpers
David Scott [Mon, 21 Dec 2009 15:36:49 +0000 (15:36 +0000)]
CA-33440: remove some more unused functions from forkhelpers

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: Now that the direct fork code has been moved to stunnel, simplify the ...
David Scott [Mon, 21 Dec 2009 15:36:49 +0000 (15:36 +0000)]
CA-33440: Now that the direct fork code has been moved to stunnel, simplify the 'pidty' to only consider the single case of forking via the external daemon.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: Move the unsafe direct fork_and_exec code from forkhelpers into stunnel...
David Scott [Mon, 21 Dec 2009 15:36:49 +0000 (15:36 +0000)]
CA-33440: Move the unsafe direct fork_and_exec code from forkhelpers into stunnel, since it's only stunnel (called from the CLI) which actually needs it.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: Remove some dead code
David Scott [Mon, 21 Dec 2009 15:36:48 +0000 (15:36 +0000)]
CA-33440: Remove some dead code

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-36075: add back in a sane default $PATH for subprocesses that need it.
David Scott [Mon, 21 Dec 2009 14:22:52 +0000 (14:22 +0000)]
CA-36075: add back in a sane default $PATH for subprocesses that need it.

In particular the 'EXTSR' storage backend expects to find 'pvcreate' on the path. Rather than just fixing this one instance and then seeing what else fails, this patch should prevent this class of error recurring.

Note that the only place we actually pass a custom environment to a subprocess is when installing the debian etch template.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-36049: install the init script into /etc/rc.d/init.d (not /etc/init.d-- this is...
David Scott [Sat, 19 Dec 2009 16:37:00 +0000 (16:37 +0000)]
CA-36049: install the init script into /etc/rc.d/init.d (not /etc/init.d-- this is normally a symlink in dom0)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: when starting an stunnel process, careful to handle the case where we still...
David Scott [Fri, 18 Dec 2009 20:48:37 +0000 (20:48 +0000)]
CA-33440: when starting an stunnel process, careful to handle the case where we still do fork the binary directly i.e. that used by quicktest and the CLI.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: Add an 'install.sh' into which we can place commands like 'chkconfig -...
David Scott [Fri, 18 Dec 2009 20:48:36 +0000 (20:48 +0000)]
CA-33440: Add an 'install.sh' into which we can place commands like 'chkconfig --add fe'. Eventually we can trigger this from a proper package post-install script.

The script is named by repo currently:
 /etc/xensource/scripts/install/install-xen-api-libs.hg.sh

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: Add an init.d script for the fork/exec daemon.
David Scott [Fri, 18 Dec 2009 20:48:35 +0000 (20:48 +0000)]
CA-33440: Add an init.d script for the fork/exec daemon.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: Make the fork/exec daemon create the directory containing the unix domain...
David Scott [Fri, 18 Dec 2009 20:48:35 +0000 (20:48 +0000)]
CA-33440: Make the fork/exec daemon create the directory containing the unix domain socket it listens on if it doesn't already exist.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: Add [-daemon] and [-pidfile] arguments to the fork/exec daemon.
David Scott [Fri, 18 Dec 2009 20:48:34 +0000 (20:48 +0000)]
CA-33440: Add [-daemon] and [-pidfile] arguments to the fork/exec daemon.

This will make it easier to write an init.d script.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-33440: add a single-threaded fork/exec daemon to fork/exec on behalf of xapi.
Jon Ludlam [Fri, 18 Dec 2009 20:48:33 +0000 (20:48 +0000)]
CA-33440: add a single-threaded fork/exec daemon to fork/exec on behalf of xapi.

The new 'fe' daemon requests and file descriptors over a unix domain socket and calls fork/exec/waitpid on behalf of clients.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Acked-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[rpc-light] add {call,response}_of_string and string_of_{call,response} for JSON...
Thomas Gazagnaire [Mon, 14 Dec 2009 17:31:52 +0000 (17:31 +0000)]
[rpc-light] add {call,response}_of_string and string_of_{call,response} for JSON as well.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] implements {call,response}_of_string and string_of_{call,response} for...
Thomas Gazagnaire [Mon, 14 Dec 2009 17:31:52 +0000 (17:31 +0000)]
[rpc-light] implements {call,response}_of_string and string_of_{call,response} for XMLRPC.

Now, need to do the same thing for JSON.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] Accept JSON string which contains UTF-XXX characters.
Thomas Gazagnaire [Fri, 11 Dec 2009 12:03:12 +0000 (12:03 +0000)]
[rpc-light] Accept JSON string which contains UTF-XXX characters.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years agoCA-35397: Increase the number of domain info structs returned per call from 2 to...
David Scott [Fri, 4 Dec 2009 17:09:54 +0000 (17:09 +0000)]
CA-35397: Increase the number of domain info structs returned per call from 2 to 100.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoFix bug in converting Bigbuffer to a string or other.
Jonathan Ludlam [Thu, 26 Nov 2009 14:39:06 +0000 (14:39 +0000)]
Fix bug in converting Bigbuffer to a string or other.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
15 years agoCP-706: add syslog facility option to xapi log.conf
Marcus Granado [Fri, 27 Nov 2009 17:22:45 +0000 (17:22 +0000)]
CP-706: add syslog facility option to xapi log.conf

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoSwitch all xapi syslog logging back to 'daemon'.
Daniel Stodden [Wed, 25 Nov 2009 20:14:08 +0000 (12:14 -0800)]
Switch all xapi syslog logging back to 'daemon'.
Since messages to 'daemon' are written asynchronously again.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
15 years ago[XIU]: add HVM and HAP flags to the hypercall simulator.
David Scott [Fri, 27 Nov 2009 22:51:15 +0000 (22:51 +0000)]
[XIU]: add HVM and HAP flags to the hypercall simulator.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoAdds functions "file_lines_{fold,iter}" to the Unixext module. These functions implem...
Jonathan Knowles [Fri, 20 Nov 2009 14:22:16 +0000 (14:22 +0000)]
Adds functions "file_lines_{fold,iter}" to the Unixext module. These functions implement the standard "fold" and "iter" functions for all the lines in a file.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
15 years agoModify the mk/Makefile to invoke autogen.sh && configure to generate the main Makefile.
David Scott [Wed, 11 Nov 2009 17:41:50 +0000 (17:41 +0000)]
Modify the mk/Makefile to invoke autogen.sh && configure to generate the main Makefile.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoAdd a trivial autogen.sh
David Scott [Wed, 11 Nov 2009 17:41:49 +0000 (17:41 +0000)]
Add a trivial autogen.sh

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoWork-around the missing XS_RESTRICT decl in xen-unstable
David Scott [Wed, 11 Nov 2009 17:41:49 +0000 (17:41 +0000)]
Work-around the missing XS_RESTRICT decl in xen-unstable

This message is only used by
http://xenbits.xen.org/xapi/qemu-xen-3.4.pq.hg?file/e89cb5405f51/depriv_qemu

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoUse autoconf to detect: xen headers; XS_RESTRICT in patchqueue; ocaml packages xmlm...
David Scott [Wed, 11 Nov 2009 17:41:48 +0000 (17:41 +0000)]
Use autoconf to detect: xen headers; XS_RESTRICT in patchqueue; ocaml packages xmlm, type-conf; libdevicemapper; and linux-specific CDROM ioctls.

Modify the xen-api-libs.hg master Makefile to conditionally compile only those libraries whose system dependencies are met. So we:
* don't compile the xen libraries (xc, xb etc) if xen/xen.h is missing
* don't compile the cdrom library if the linux ioctls are missing
* don't compile the xml-light2, rss libraries if xmlm is missing
* don't compile rpc-light if type-conv is missing
* don't compile camldm if libdevicemapper is missing

This makes it easier for these libs to be used by other tools which may not need (eg) the xen or devicemapper bindings. Note that xen-api.hg needs most of these so any missing library will lead to a xen-api.hg build failure.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoadd autoconf infrastructure, including the OCaml M4 macros
Anil Madhavapeddy [Fri, 6 Nov 2009 18:50:06 +0000 (10:50 -0800)]
add autoconf infrastructure, including the OCaml M4 macros

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years ago[packaging] separate the normal Makefile from the one used to build the components...
Thomas Gazagnaire [Wed, 11 Nov 2009 17:41:47 +0000 (17:41 +0000)]
[packaging] separate the normal Makefile from the one used to build the components and create a bins target which build and install binaries (as closeandexec).

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years agorename the Sexpr module to Sexpr_TS to avoid a case-insensitivity conflict with the...
Anil Madhavapeddy [Tue, 3 Nov 2009 03:27:08 +0000 (20:27 -0700)]
rename the Sexpr module to Sexpr_TS to avoid a case-insensitivity conflict with the SExpr module

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years agoRemove the statfs(3) stubs as they are not used in XAPI any more, and it assists...
Anil Madhavapeddy [Thu, 5 Nov 2009 02:44:57 +0000 (02:44 +0000)]
Remove the statfs(3) stubs as they are not used in XAPI any more, and it assists with non-Linux portability.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years agoRemove signal handler debug stubs for FPE/SEGV from stdext as they are not needed...
Anil Madhavapeddy [Wed, 4 Nov 2009 20:55:18 +0000 (20:55 +0000)]
Remove signal handler debug stubs for FPE/SEGV from stdext as they are not needed by XAPI any more

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years agoExplicitly include the ocaml install location in the Makefile so that it works with...
Anil Madhavapeddy [Wed, 4 Nov 2009 20:50:54 +0000 (20:50 +0000)]
Explicitly include the ocaml install location in the Makefile so that it works with installs outside the search path also (e.g. MacPorts)

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years ago[ocamldoc] Distinguish between libs and packs
Rob Hoes [Fri, 30 Oct 2009 12:50:42 +0000 (12:50 +0000)]
[ocamldoc] Distinguish between libs and packs

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoSwitch all xapi syslog logging to 'local6' rather than 'daemon' (ie same as blktapcnt...
David Scott [Fri, 30 Oct 2009 12:50:07 +0000 (12:50 +0000)]
Switch all xapi syslog logging to 'local6' rather than 'daemon' (ie same as blktapcntrl is about to use). This allows us to (i) keep logging through syslog; but (ii) define in the syslog.conf whether the data is written synchronously or not.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-34200: audit-log should have info level
Marcus Granado [Thu, 29 Oct 2009 18:19:34 +0000 (18:19 +0000)]
CA-34200: audit-log should have info level

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years ago[ocamldoc] Build-in Ocamldoc support
Rob Hoes [Wed, 28 Oct 2009 17:06:00 +0000 (17:06 +0000)]
[ocamldoc] Build-in Ocamldoc support

Typing 'make doc' will generate documentation for the libraries in xen-api-libs. The documentation is integrated in the xen-api documentation (the custom ocamldoc generator in xen-api.hg is used). This only works when xen-api.hg is present in myrepos and 'make doc' has been executed in it.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoDrop the runtime lock while calling syslog() in case it blocks for a long time.
David Scott [Wed, 28 Oct 2009 17:02:04 +0000 (17:02 +0000)]
Drop the runtime lock while calling syslog() in case it blocks for a long time.

The effect of writing synchronously to /var/log/messages has become much more noticable ever since we moved to a kernel with a fixed fsync().

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[refactoring] Create new targets for binary generated by components of xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Create new targets for binary generated by components of xen-api-libs.hg

By default, these binaries will be installed on /opt/xensource/libexec

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] remove unused sha1 library (the one we use is in stdext)
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] remove unused sha1 library (the one we use is in stdext)

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Update the main Makefile to build the new libraries
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Update the main Makefile to build the new libraries

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to xs explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to xs explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to unix explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to unix explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependencies to mmap and uuid explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependencies to mmap and uuid explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependencies to mmap and uuid explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependencies to mmap and uuid explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to unix explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to unix explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependencies to unix and xb explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependencies to unix and xb explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move SExpr from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move SExpr from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move stunnel from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move stunnel from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move RSS from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move RSS from xen-api.hg to xen-api-libs.hg

15 years ago[refactoring] Move pciutil from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move pciutil from xen-api.hg to xen-api-libs.hg

15 years ago[refactoring] Move closeandexec from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move closeandexec from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move http-svr from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move http-svr from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move few files from xen-api.hg to xen-api-libs.hg/stdext
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move few files from xen-api.hg to xen-api-libs.hg/stdext

15 years ago[refactoring] Move xmlpp from xen-api.hg to xen-api-libs.hg/xml-light2
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move xmlpp from xen-api.hg to xen-api-libs.hg/xml-light2

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to unix explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to unix explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] move debug.ml from xen-api.hg to xen-api-libs.hg/log
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] move debug.ml from xen-api.hg to xen-api-libs.hg/log

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] upgrade to use xmlm-1.0.1.
Thomas Gazagnaire [Fri, 16 Oct 2009 13:50:46 +0000 (14:50 +0100)]
[rpc-light] upgrade to use xmlm-1.0.1.

Lots of small changes, starts to become stable so include it in the build.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[xmlm] upgrade to version 1.0.1
Thomas Gazagnaire [Fri, 16 Oct 2009 13:44:39 +0000 (14:44 +0100)]
[xmlm] upgrade to version 1.0.1

Patch from Vincent Hanquez + bugfixes from me.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>