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>
xe-toolstack-restart: Handle xenopsd proliferation, and only restart enabled services

We now have multiple xenopsd processes for different backend libraries.
The restart script needs to handle this, restarting only the variant
that is supposed to be running.

This change is more general, and only restarts any Xapi-related process
if chkconfig says that it should be running.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Merge pull request #1555 from euanh/ea1268

xe-toolstack-restart: Handle xenopsd proliferation, and only restart ena...
Merge pull request #1512 from simonjbeaumont/cp-6172-xapi-part

Add VBD.other_config:backend-kind for blktap3
SCTX-1585: Handle hosts having different lists of features

During an upgrade, the older hosts will not indicate whether or not they
support newer features. If a host doesn't support a feature, always
treat as restricted on that host for the purposes of working out the
pool restrictions.

Signed-off-by: John Else <john.else@citrix.com>
(cherry picked from commit fb82876687e7e6d30f7707308914866a61fe9482)
SCTX-1585: Get additional features from the master

Use the master's license_params as the "definitive" list of features,
rather than just picking a host at random.

Signed-off-by: John Else <john.else@citrix.com>
(cherry picked from commit 42bbb8b3fef5fac1b89d3ae8ffc8af490bd7fa38)
Revert "SMAPIv2: avoid calling ourselves via the Unix domain socket"

Unfortunately bypassing the Unix domain socket also bypassed a
special 'rpc' function which (unlike all other rpc instances) contains
logic for dealing with the Redirect exception. We probably should
put the Redirect logic in some special global place eventually, rather
than in the middle of the migrate code.

This reverts commit 45562dff9aa61d2905695b2e8d307ccc92961a6f.
CA-122487: revert a corresponding OMakefile change

The storage_local_client module has been removed.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add VGPU releases to datamodel

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Add "managed" field to PIF and param to PIF.introduce

Indicates whether the interface is managed by xapi. If it is not, then xapi
will not configure the interface, the commands
PIF.plug/unplug/reconfigure_ip(v6) can not be used, nor can the interface be
bonded or have VLANs based on top through xapi.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Only attempt to bring up managed PIFs at start of day
Enforce that only managed PIFs can be plugged, unplugged, and reconfigured

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Enforce that only managed PIFs can be bonded or have VLANs/tunnels

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Don't attempt to bring down an unmanaged PIF when forgetting it

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
When attaching a network, only configure managed PIFs

This change means that PIFs that are not managed by xapi can still be used by
VMs, and as management interface, but xapi will assume that they have already
been configured. This means that the interface must be up, it must have a
bridge (with a name matching the related network.bridge field), and it must
have IP configuration (in case of the management interface).

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Add optional "managed" argument to "xe pif-introduce"

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Whitespace and style improvements in management_reconfigure

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Allow changing management to an unmanaged PIF

For an unmanaged PIF, the ip_configuration_mode will always be "none". We still
allow such a PIF to be the management interface, and rely on "something else"
to setup the bridge and IP address.

Also fixes assertion logic in host.management_reconfigure.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Allowing to forget the management PIF may cause trouble

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #1560 from thomassa/tr3-sctx-1585

SCTX-1585: master defines pool features; handle hosts with varied feature-sets