Don't believe the result of Bindings.get_status if dev has no carrier

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>
CA-84688: log changes ("drift") between a monotonic clock source and UTC

This highlights when problems are being caused by the system clock being manipulated.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-85940: use the creation time measured with a monotonic clock to judge which domain is "newer" for a given UUID

The previous metric (whether a VM had clocked up CPU time or not)
would be confused if neither domain had started.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-86756: attempt to return Unix signal names rather than ocaml signal numbers

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-86756: avoid spinning if the fork/exec daemon isn't available

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Remove redundant checks from VM.set_is_a_template.

These checks are not needed as these cases are already handled by the
allowed_operations code.

Signed-off-by: John Else <john.else@citrix.com>
Proper CLI printing for error vm_assigned_to_protection_policy.

Signed-off-by: John Else <john.else@citrix.com>
Don't believe the result of Bindings.get_status if dev has no carrier, more efficient

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>
CA-86833: Cannot delete VM if RRD daemon is not running in DOM0

This patch puts a try-catch-log wrapper around the relevant call from xapi
to xcp-rrdd.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Merge commit '8c73b68b13c7b4cb86236f7a04157b12aa81004c'
Merge commit 'c3f4a73f4db92107688117e4b059480b443ba9c8'
CA-85231: Allow cross-pool migration only if VM has less than one snapshot and no checkpoints.

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@ocamlpro.com>
Improved updating of PIF metrics.

This fixes a bug where PIF metrics for the management interface would not be
updated for the management interface right after the first boot.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Committed-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CA-80695: Remove setting of MTU in vif frontend area as Boston windows PV
          drivers interpret it as maximum frame size.
CA-86139: memory-actual still zero 2 mins after host became enabled

When master restarts, VM metrics for VMs on the slaves need to be updated.

This was one of the functionalities that the RRD code that was party of xapi
was previously performing in a fairly convoluted way. During the RRD code
refactoring, this functionality was lost. It is now implemented with a simple
cache-clear operation on the slave.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Committed-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge commit '633a9f7cdbdf2cd3f9603c9e5b15c64cf34c5f26'
Fix logging.

Signed-off-by: John Else <john.else@citrix.com>
Merge commit 'd22abcfeb916c79c29ef091f989acec9c06d5d54'
CA-81449: Take VCPUs_at_startup into account when starting a guest.

Previously we were creating all the CPU devices as online.

n.b. adding the "online" option to Device.Vcpu.add means it's
functionally identical to Device.Vcpu.set

Signed-off-by: John Else <john.else@citrix.com>
Added monitor_dbcalls.mli to promote encapsulation.

Included OCaml docs.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>