TODO - find a less hacky way of doing this
CA-112880: Fix race condition writing memory-actual

There was a race condition between the sender and receiver during migration.
This is due to the interplay with the monitor threads. Monitor_rrds.update_rrds
is run every 5 seconds and checks for changes. This module also has a cache of
values and only writes to the database if the cache is dirtied to avoid
excessive database writes. There is such a monitor thread running on each host.

The monitor thread on the sender may wake and write a value to the database
after the domain has been resumed on the receiver but before it is destroyed on
the sender. This could be a spuriously low value in the case where Xen is
reclaiming the memory on the sender side during the domain destroy.

The receiver however may have already updated its cache and written its value
to the database. It never writes on subsequent runs of the monitor thread since
it thinks the value that is in its cache (the correct value) is already in the
database (which it is not).

To remedy this we need to ensure that the monitor for a given host only updates
the VM_metrics in the database for VMs that are resident on that host. We also
provide a means to mark the cache as dirty when the migration has finished
since the receiver may have its cache updated before the resident_on field is
set.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #1543 from simonjbeaumont/ca-112880-trunk

CA-112880: Fix race condition writing memory-actual
CA-116281: restart syslog service instead of reload

rsyslog does not support reload, host-syslog-reconfigure
is not working at present.

Signed-off-by: Simon Rowe <simon.rowe@eu.citrix.com>
Merge pull request #1545 from srowe/master

CA-116281: restart syslog service instead of reload
Update to use new Tar, Tar_unix interface from ocaml-tar 0.2.1

The new ocaml-tar library separates the modules into:

   Tar: for pure OCaml definitions
   Tar_unix: for impure Unix I/O
   Tar_lwt: for impure Lwt I/O

So mostly we have to replace Tar. with Tar_unix. and adjust the
OCAMLPACKS.

Most of this code concerns VM import/export. There is an alternative
implementation which is much more efficient inside recent releases
of vhd-tool, so we should switch to that soon.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #1546 from djs55/ocaml-tar

Update to use new Tar, Tar_unix interface from ocaml-tar 0.2.1
Merge remote-tracking branch 'trunk/master'