Propagate network errors out of Http_client module

... otherwise the callers (such as Xmlrpc_client) will get HTTP errors instead, hence lost the chance of diagnosing the network problems (e.g. stunnel issues).

Another possibility is to transform the Unix exception as module specific exception (or variant in the return type) and handle/wrap/propagate it in each upper layer (where necessary).

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Use explicit method system.isAlive to substitute the confusing "Unknown rpc"

... though this is not a clean implementation (we still inline the uuid as a part of the method name) for compatability reason (just considering the communication between old and new hosts during upgrade).

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
De-prioritize some stunnel log from info level to debug level

Note that these lines use the "xapi" logging component, so they wil still be recorded in xensource.log (with our default log.conf).

Should we use the "stunnel" logging component instead, so that these debug level messages won't show up in xensource.log by default? They are indeed quite spammy.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
[rpc-light]: when marshalling XMLRPC, don't lose float precision

Printf with "%g" will create strings like "1.32621e+09". If this was
a result from Unix.gettimeofday() then you've just rounded to the
nearest 5000 seconds (about an hour and a half)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Move fe up in the boot sequence

We need to start networkd earlier in the boot sequence, and networkd
need fe to be running.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge commit 'e2ad144088ce6dfff1ba07849493b1fcedd16c3b'
Update to the new macro name after discussion with Peter

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Add update_assoc function to Listext

"update_assoc update existing" includes everything from "update" and all key/value
pairs from "existing" for which the key does not exist in "update". In other words, it is
like "replace_assoc" but then given a whole assoc list of updates rather than a single
key/value pair.

The patch also fixes replace_assoc.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge commit 'ad1125a51c0dfa2dffff2032eed54111ac1c149e'
Merge commit 'acdbe488152a58f37bef6ebb4768b2174a3d96bf'
[xenctrlext]: add 'xenctrlext' to contain miscellaneous bindings not in upstream.

Also add 'get_host_cpufeatures' which is conditionally-compiled such that
it will fail if the system doesn't support the call.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenctrlext]: add domain_set_{timer_mode,hpet,vpt_align}, domain_send_s3resume, domain_get_acpi_s_state

These functions are in upstream libxc but not in the ocaml xenctrl package.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenctrlext]: Add domain_trigger_{power,sleep}

If these functions are not in libxc, then these functions silently fail.
This is similar to physical in which a system will have a power button
but this might not be hooked up to anything.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenctrlext]: add binding to xc_domain_suppress_spurious_page_faults

This was present in libxc but not in xenctrl.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenctrlext]: add domain_get_runstate_info

If this is not present in libxc then this will throw an exception.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenctrlext]: add get_max_nr_cpus

This returns a field in the physinfo structure that's exposed in libxc but
not in xenctrl.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
.gitignore should ignore all META files but only the root Makefile

It should also ignore files with '#' at the beginning (ie emacs autosaves)
[xenctrlext]: make sure all C symbols have 'xenctrlext' in the name to avoid clashes

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[rpc-light]: depend on 'type-conv' rather than 'type-conv.syntax'

By doing this we're compatible with both the XCP build environment and
the debian type-conv package.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge commit '6611afe10f816890a859c18e333f1f487c07c7e2'