CA-147820: don't run hotplug add if params is missing

This patch checks the return value of "xenstore-read" when it reads
"backend/vbd/domid/devid/params" while processing an "add" event. This
ensures that we won't write garbage to XenStore, which otherwise
confuses everyone.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Release 1.9.58

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #2024 from djs55/release.1.9.58

Release 1.9.58
Remove qemu-dm-wrapper

xenopsd has its own copy; we haven't installed the copy from xen-api.git
in a while.

Signed-off-by: John Else <john.else@citrix.com>
Update .gitignore

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #2025 from johnelse/remove-qemu-wrapper

Remove qemu-dm-wrapper
CA-80791:WLB | perhaps vm-retrieve-wlb-recommendations should return host-uuids, to enable user to differentiate between same-named hosts

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
Fix release_version of get_SRs_required_for_recovery

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Revert "CA-137468: Wait for ofport to settle before modifying ovs rules"

This reverts commit c3dd95722e42d51dfdf45983e81c74b89d99b540.
We need to look at this commit again, because it seems to create problems.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-119317: Move backend-kind to VDI.other_config

This way the SM driver can set this and special case where necessary for
certain SR types.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-119317: Consider VDI.sm_config:backend-kind

Allow a way of an SM driver to configure the VBD backend to be used for this
VDI. This is done by setting the backend-kind key in the sm_config field.

This value will be used but will still be overridden if a value appears in
other-config (user-configurable).

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Whitespace: Fix formatting in Xapi_vbd module.

The following produces the same before and after the commit.

    $ camlp4o -printer o -no_comments ocaml/xapi/xapi_vbd.ml | md5sum
    4d75d489ebdf8bb7b186baaba12a35bb  -

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-133780: Set VBD backend-kind on VBD creation

Getting this informaton from the VDI record in the Xenopsd metadata translation
layer caused CD-eject to hang because ejection is done by setting the VDI ref
for the VBD to NULL.

Instead, the SM can still set the backend-kind sm-config key which will be
placed in other-config of the VBD at creation. It can still be overwritten by
the user.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Use default VBD backend for empty CD drives

Now that the VDI is queried for a VBD backend at VBD creation, we need to
handle the case when the VBD is created with VDI ref NULL. This will be the
case for creating an empty CD drive, for example, on VM.import.

Since the model is to not add anything to the other_config field for default
behaviour then now we widen the exception handling such that _any_ failure to
find a specified backend kind results in the default.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Log session stats every 10 mins

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Increase the session limit

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Remove 4 spammy log lines

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
HTML docs: add whetstone and  creedence

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #2030 from johnelse/docs-trunk-port

HTML docs: add whetstone and  creedence
CA-152227: xe: when uploading a file, allow the contents to be read from a pipe

If we can determine the file length (i.e. the case of a regular file)
then we supply a "Content-length" header. This will allow the Task progress
bar to be kept up to date.

If we cannot determine the file length (e.g. the case of a pipe) then
we rely on EOF to represent the end-of-stream.

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