CA-88840:User Friendly error message when cross/intrapool migration fails

Signed-off-by: Akshay Ramani <akshay.ramani@citrix.com>
CA-102759: loosen HA restriction on expired hosts

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CA-105098: GenID field was rel_clearwater, not rel_augusta

We also need to bump the augusta schema minor number, since we recently had to
bump the clearwater schema minor number.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-101699: Run VM.copy on the master

The VDI.copy subtask(s) created by VM.copy will be forwarded to suitable
hosts, so it's debatable whether we need to forward VM.copy at all.

Before this change the VM.copy task was forwarded based on source SR(s)
only, which is definitely wrong - in the case where a VM is being copied
from shared storage to local storage, the VM.copy task would be
forwarded to a random host (with slaves preferred) and then the VDI.copy
task(s) would be forwarded again to the host connected to the local
storage.

Besides kicking off VDI.copy tasks, VM.copy mostly just creates objects
in the database and watches for events on those VDI.copy tasks, both of
which are most efficient on the master.

Maybe when the database is split up across hosts it will make more sense
to forward the VM.copy task to a host which can see both the source and
destination SRs.

Signed-off-by: John Else <john.else@citrix.com>
CA-101699: Don't serialise VM.copy per host

VDI.copy is the CPU-intensive task so there's no need to serialise
VM.copy per host, especially now that VM.copy always runs on the master.

Signed-off-by: John Else <john.else@citrix.com>
CA-101699: Allow VDI.copy if a VDI is only attached RO

Attempting to copy a VDI which is being written to can confuse
sparse_dd, however if a disk is only attached RO it's safe to copy it.

Signed-off-by: John Else <john.else@citrix.com>
Move test_ca98944.ml

This can be used as a basis for more VDI.allowed_operations tests so
let's give it a more generic name.

Signed-off-by: John Else <john.else@citrix.com>
CA-101699: Add unit tests for the allowed_operations changes

Signed-off-by: John Else <john.else@citrix.com>
CA-105160: Make sure event_wait is cancellable

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-105159: Wait for ack of shutdown request for HVM guests with PV drivers

The code paths only handled fully-PV guests and HVM guests without PV drivers.
In the case of PV drivers we did not wait for the shutdown request to be
acknowledged. This did not enable early exit if the request was not
acknowledged.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-105155: Make sure we timeout as requested

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CP-4465 contribution: reduce logging of low-value messages
 * log less in block_device_io.action_writedelta
 * shorten a common log line in xapi_session.ml

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Merge pull request #1187 from johnelse/ca-101699

CA-101699: Fixes for concurrent VM/VDI copy
Altering get_bridge_name_vswitch() to work correctly with VLANs.
VLAN-tagged networks/ports are connected to a "fake bridge" device.
Most ovs-* commands will not work with a fake bridge
device, so this function needs to return the true parent bridge
device name, not the fake bridge.  Otherwise, subsequent calls
in this script to configure port locking via ovs-ofctl will
(silently) fail, and port locking will not activate.

Signed-off-by: Kevin Tower <ktower@towerfamily.org>
Make VM.shutdown timeout configurable.

The default remains at 1200.0

Configure by creating/editing a file /etc/xensource/xapi_globs.conf
and put in the line:

domain_shutdown_total_timeout = 30.0

for example.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Make it such that you can do a hard_shutdown even if a clean_shutdown is in progress

Same for reboot

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #1180 from ktower/master

Fix scripts/setup-vif-rules to work with VLAN-tagged networks
Merge pull request #1197 from thomassa/lesslog

CP-4465 contribution: reduce logging of low-value messages
Add API error DUPLICATE_MAC_SEED

Signed-off-by: John Else <john.else@citrix.com>
Add message Pool.assert_mac_seeds_available

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