Don't default to master host-uuid if sr-create shared=false

sr-create had been defaulting the host-uuid to master if it wasn't
specified. This would cause problems when creating a local SR without
specifying the host-uuid. We now raise a CLI exception if we create
non-shared SR without specifying the host-uuid.

CA-98185

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Use SMAPIv2 VDI.stat for XenAPI VDI.update rather than SMAPIv1 vdi_update

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Report out-of-space, not patch-invalid

If there isn't enough space on the filesystem to upload a patch (which can take
2-3 times the size of the patch, because of multiple copies and gpg signature
checking), we should fail with an Out_of_space exception. Before, if the gpg
check failed because there wasn't enough space to write the unsigned cleartext,
we would erroneously report patch_invalid. Now we check that there is enough
free space to signature check the patch (we make a guess of 2 * size of the
patch), and catch Unix.ENOSPC exceptions and handle them accordingly.

CA-124008

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Whitespace fix for get_patch_to_local

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
assert_space_available takes optional multiplier arg

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
get_patch_to_local checks filesystem space on slave

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
mkdir -p /var/patch, which might not be there

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
whitespace: spaces to tabs

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
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>
Update udhcp.md
Merge pull request #1672 from grantmcwilliams/patch-1

Update udhcp.md
Correct API versioning for the vdi.copy extension

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Bump API version to 2.2

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
datamodel: VDI.copy was extended in clearwater-felton, not clearwater

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
HFX-1078: [SCTX-1635] Handle storage exception while unplugging VBD.

Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
CA-130161: Revert "CA-126097: Block clone of live VDIs"

Disks attached to a checkpoint look like they're live, so blocking clone
of live VDIs broke checkpoint revert.

This reverts commit a8aece189b38095c74a6e3b0aee3d8d255e42248.