CA-86573: When HA is enabled on a pool, forbid the deletion of a bond if it is the mgmt interface

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>
Merge commit '9b0671949ee5463ffe0632da4743e82fb3d91ab9'
CA-87345: Persist port locking rules when importing a VIF.

This means port locking rules will also persist over cross-pool
migration.

Signed-off-by: John Else <john.else@citrix.com>
networkd: set the broadcast address when configuring an IPv4 address

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Allow CLI lookup of PBDs by SR.name_label and host.name_label

The equivalent is already implemented for the other connector types
(VIFs, VBDs and PIFs).

Signed-off-by: John Else <john.else@citrix.com>
CA-85142: Add a function to remove messages from the in_memory_cache

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-85142: Remove messages from the in_memory_cache on deletion

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-85142: Change the types returned by Xapi_message.get_since_for_events

This is so we can now return delete events too, though we aren't yet.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-85142: Use generation counts for message events.

Retain the distinction between message generation count and standard
db generation count for the purposes of event.from - we can't
atomically get both, so if we combined them we'd risk losing events.

Also add a quicktest test for message events.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-87541: Upgrade foreign database to the local schema.

This will allow data to be exported from a database created by a
version of XenServer with an older database schema.

Signed-off-by: John Else <john.else@citrix.com>
Merge commit 'a5ba6bbf32a3e62b30715ad6c697282291a62b3c'
CA-87757: Allow VM operator and above to set task.other_config:XenCenterMeddlingActionTitle

Signed-off-by: John Else <john.else@citrix.com>
Merge commit '4d1d182f897e9e56d91f1077ab8463af91b2aef0'
CA-86764: Fully specify VDI map in VDI.pool_migrate

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-86474: don't guess destination SR, and require full VDI map for migrate_send

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Remove unneccessary check for xenopsd in migrate_send

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-86568: Kill only the vncterm parent process

Do not kill the process group.

vncterm will now catch SIGTERM, pass it on to its child process,
wait for it to exit, clean up, and finally exit itself.
CA-86764: call migrate_send with VM lock in Message_forwarding.VDI.pool_migrate

Before this change, migrate_send operations for consecutive VDI.pool_migrate
operations on the same VM were being queued after VDI:SR maps had been
specified in the VDI.pool_migrate operation. So by the time the first
migrate_send operation completed and the second one began, the cached VDI:SR
maps were stale and pointing the wrong SRs. Because we wait to call
VDI.pool_migrate until we hold the VM lock, the VDI:SR map is created with the
correct VDIs and SRs.

This patch will build, but will unfortunately deadlock without the following
patch applied, since VDI.pool_migrate now tries to call VM.migrate_send with
the VM lock held, and this lock isn't reentrant.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-86764: Move Xapi_vdi.pool_migrate to Xapi_vm_migrate.vdi_pool_migrate.

To fix the deadlock mentioned in the previous commit, we needed to call
migrate_send directly, instead of going through the message forwarding layer.
This caused a mutually recursive module error, so we had to move
VDI.pool_migrate to Xapi_vm_migrate.

Note that we've moved the code which determines which host to run the local API
call on to *inside* the critical section, so that if the VM is moved by a
previous migration that we're waiting on, we don't try running this command on
the wrong host.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Add comment to xapi_vdi.ml explaining where pool_migrate was moved

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>