Make /etc/xcp if necessary

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Make xapi more resiliant to missing config files

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Avoid calling the mail-alarm script if it doesn't exist.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove assert()s which are supposed to trigger and are ignored; actually log when an error occurs.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Log a sensible error message if the pool.conf can't be read.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
SCTX-1616: Ensure PBD.device_config:SRmaster never exists

This should never be part of the PBD record. Instead it is computed before each
SM call in (the internal function) Sm.__get_my_devconf_for_sr before being
passed to the SM driver. Having this field in the device config will mean that
the wrong value could be passed to the SM.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #1712 from simonjbeaumont/sctx-1616

SCTX-1616: Ensure PBD.device_config:SRmaster never exists
Restore compatibility with OCaml 4.00.1

Signed-off-by: David Scott <dave.scott@citrix.com>
Use xcp-inventory rather than built-in inventory parser.

Signed-off-by: David Scott <dave.scott@citrix.com>
Merge pull request #1662 from djs55/from-xenserver-core-nobrainers

xenserver-core: Simple robustness improvements
Replace ad-hoc config file handling with Xcp_service.configure

This is the same as other xapi daemons. It allows each option to
be read from a config file and overriden on the command-line.

Also, extend the default xapi.conf with comments describing all
available options which previously were undocumented.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
packaging: allow the path to xapissl to be set in the config file

Signed-off-by: Jonathan Ludlam <jonathan.ludlam@eu.citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
packaging: Move pool role path and pool secret path into xapi_globs

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
packaging: allow the path to udhcpd to be specified

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove config_shared (unused module)

Signed-off-by: David Scott <dave.scott@citrix.com>
xapi.spec.in: hard-code /etc/xensource as we do elsewhere

We will eventually replace this spec file with one from the buildroot.
In the meantime we follow the existing convention.

Signed-off-by: David Scott <dave.scott@citrix.com>
Minor build fix following an upstream change

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #1668 from djs55/from-xenserver-core-xcp-services

Replace ad-hoc config file handling with Xcp_service.configure
packaging: add a configure script

The configure script generates 'config.mk' (containing Makefile key/value
pairs) and 'ocaml/fhs.ml'. The defaults are the XenServer distro ones i.e.
non-FHS compliant paths. Anyone who wants to be FHS-compliant will need
to override most of the paths.

Signed-off-by: David Scott <dave.scott@citrix.com>
xenops: make the dead code continue to build

Since xenopsd nolonger lives in this repo, all this code should be
ripped out.

Signed-off-by: David Scott <dave.scott@citrix.com>