Add a script which can import VMs created by 'boxgrinder'

The standard output format of 'boxgrinder' comprises:
  foo.xml
     -- contains the VM metadata
  disk.raw
     -- one or more disk images

To import such a VM, use:

  $ import-boxgrinder.py -s http://server -u root -p password foo.xml

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-83745: make Storage_access.{bind,unbind} logging symmetrical

This should help track down places where we call either too often.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-83745: protect the SR hashtbl with a mutex, log {register,unregister}

It is just possible we lost items due to concurrent access to the hashtbl.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove storage RPC log-spam

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-83745: work-around a race between SR.create and PBD.plug by making PBD.plug more robust

The following interleaving appears to be possible:

XenAPI SR.create
  creates PBD
  adds SR to hashtable
  calls SMAPI sr_create
                                          XenAPI PBD.plug
                                            adds SR to hashtable
                                            sets currently_attached to true
  removes SR from hashtable
  calls XenAPI PBD.plug
    no-op since currently_attached = true

-- at this point a PBD is currently_attached = true but the SR is nolonger in the hashtable.

This race window always existed but it has recently been enlarged.

We work around this by unconditionally adding the SR to the hashtable in PBD.plug
irrespective of the value of currently_attached. Since SR.create always ends with
a call to PBD.plug, we gain the property that when the SR.create has finished
the SR must be in the hashtable.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-80410: Fix memory/target not initialized in Dom0

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
xe host-evacuate accepts all host selectors

Use helper function do_host_op, but disable multiple host selection.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-83893: Fix the clirt following renaming of pv drivers

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-81329: Attach networks on receiver before VM migration (from old protocol)

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Merge commit '0bff0f5b82225aaa192c408ab18849522d2b8227'
CA-81330: If we need to add default flows to an ovs port, ensure we got a MAC

Default flows need to be added to an ovs instance whenever the fail mode
changes from standalone to secure. If we don't do that, the DVS controller
won't have access to the vswitch anymore.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-83990: Update bond-links-up field when a bond status change.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-82955: Live VDI migration tasks cannot be canceled.

Signed-off-by: Rabin Karki <rabin.karki@citrix.com>
Merge commit '2ea6a3245fdb9809bb5e2bf06f3dd81845467e6b'
Merge commit 'ee4816be8af170fcc79990902fe488f681960654'
Merge commit 'b7222be0c38313aae72e47bd0aa8d41f17564f33'
CA-84345: WLB is unable to add pool when pool master uses IPv6 address.

Signed-off-by: Rabin Karki <rabin.karki@citrix.com>
networkd: changed port.mac to port.bond_mac, which make its semantics clearer

Also change the type of the field from "string" to "string option", so we don't
have to use "" to mean "not present", and type checker can do its work better.

The same changes were applied to the "mac" parameter of the Bridge.add_port
function.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge commit 'ea5af9ba70d5ecba7e1d96468afee83517b3aea1'
CA-84333: New XenServer installation has crash dump files. xapi mistakes sacrificial files as crashdumps.

Signed-off-by: Rabin Karki <rabin.karki@citrix.com>