CP-6172: Add VBD.other_config:backend-kind

Note: this change is co-dependent on a change in xenopsd.

Blktap3 and kernel blkback need to co-exist and, since kernel blkback watches
keys in the /local/domain/0/vbd/ tree, the paths for blktap3 need to be moved.

A new key has been added to the other_config field of the VBD record which is
passed through to xenopsd to determine where to place the VBD's XenStore
entries.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-6172: Don't specify VBD backend-kind by default

Rather than defaulting this value (meaning we have to keep parity with
xenopsd), leave the default to be determined by xenopsd itself by not
specifying a backend-kind.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-6172: Xenopsd support for Blktap3

This allows Blktap2 and Blktap3 to coexist.

Note: the backend path is specified by a new "backend-kind" key in the
extra_backend_keys of the VBD metadata.

The default_vbd_backend_kind is configurable option and can be specified by
setting default-vbd-backend-kind in xenopsd.conf.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-6172: Refactor blktap3 support for backport

The work for Xenopsd to support multiple VBD backends was developed upstream in
xenopsd.git (post disaggregation) and was then squashed and ported wholesale in
478563a.

There are a number of differences in this pre-disaggregation world and this
commit adds the changes necessary for the backport to work:

    * Some fixes for the `xenops` binary to ignore the Vbd variant type
    * Move the parsed config away from xenopsd.ml to avoid circular dependency

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-82314: networkd: introduce Linklocal6 IPv6 address mode

This commit redefines the IPv6 address mode "None6" to mean "no IPv6 address at
all, not even a link local one", and introduces the new mode Linklocal6, which
means "only IPv6 address, except a link local one".

Previously, it was not possible to get networkd to remove the link-local IPv6
address from an interface.

When a link local IPv6 address is requested, it is derived from the interface's
MAC address as commonly done.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-82314: nm: Allow (only) bridge interfaces to have a link-local IPv6 address

Due to a recent change in xcp-network, the None6 IPv6 address mode removes all
IPv6 addresses, including the link local one.  To avoid problems with bonding,
we only want bridge interfaces to have any IP addresses, while the physical
interfaces may not even have a link-local address.

This commit ensures that bridge interfaces are configured accordingly.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-90424: Does not migrate VDI if it is already migrating.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CP-6172: Enable blktap3 as default VBD backend kind

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-116420: when creating linux bond, add MAC address after adding bond slaves

This is needed under kernel 3.x, because the kernel now changes the bond
MAC to the MAC of the first slave that is added, which is not always
what we want.

Imported from xcp-networkd.git 0726ee01d071daa0ed8f1011e8bd5e6b05fee47b

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Imported-by: John Else <john.else@citrix.com>
CA-114498: Linux bonding: set properties (e.g. mode) before adding slaves

This is needed to get LACP bonding to work on the Linux bridge backend.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Imported-by: John Else <john.else@citrix.com>
Merge pull request #1688 from johnelse/criticals-from-trunk

Backport critical fixes from trunk
networkd: don't disable GRO by default

Imported from xcp-idl.git 00439e84bb82460950405f8e06d68d7c0dca952d

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Imported-by: John Else <john.else@citrix.com>
Update last released database schema version

Signed-off-by: John Else <john.else@citrix.com>
Add PIF.properties field

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Add PIF.set_property

We'll add some constraints to this in the next patches.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Add creedence release

Signed-off-by: John Else <john.else@citrix.com>
Fix up release versions in datamodel

Signed-off-by: John Else <john.else@citrix.com>
Set PIF properties when creating a new PIF, depending on the type of PIF

The only property that we currently recognise is "gro", which by default has
the value "on".

GRO is a low-level property of a network interface, which applies to physical
PIFs, and to a bond as a collection of physical PIFs.

We therefore currently distinguish the following cases:
* A physical PIF gets the default properties when introduced.
* A bond PIF inherits the PIF properties from the primary slave.
* A VLAN or Tunnel PIF does not have properties. It is assumed to implicitly
  inherit the properties from the PIF it is based on.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Validate input to PIF.set_property

We currently only accept the "gro" property, which can be "on" of "off".

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Only allow PIF.properties to change on unbonded physical PIFs or bond PIFs

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>