CA-147161: Discard messages after logging to remote host

Make rsyslog discard messages after they have been logged locally and
sent to a remote host to prevent the default rules from picking them up.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
CA-139501 VM hard_shutdown & hard_reboot must wait for nothing else.

We were already allowing hard_reboot concurrent with a clean_reboot
already in progress, and the same for hard/clean shutdown, but
clean_(shutdown|reboot) would block hard_(reboot|shutdown).

Now the is_allowed_concurrently function allows hard_shutdown
concurrent with anything except itself, and allows hard_reboot
concurrent with anything but itself or hard_shutdown.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
(cherry picked from commit a9816b9b549fad1e8e4169c69bbad5e9f2f3ab8e)
Whitespace: fix horrible spaces-then-tab-then-spaces indentation.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
(cherry picked from commit 62393a77fa00cdc1bc798c9bc57fe73fa6413647)
Merge pull request #1959 from rosslagerwall/rsyslog-fix

CA-147161: Discard messages after logging to remote host
CA-148772: support consoles served over Unix domain sockets

Xenopsd with libxl + upstream qemu prefers to bind consoles to
named sockets like

  /var/run/non-persistent/xenospd/consoles/VM/<uuid>

rather than anonymous localhost port numbers. Naming consoles is
a good idea because it prevents accidentally connecting to the
wrong port number.

This patch allows Xapi to connect to these Unix domain socket
consoles. Note there is still a lingering problem with upstream
qemu and XenCenter's built-in RFB client which causes the
keyboard not to work.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CP-9906: Raise a ref rather than a UUID for VDI_NOT_IN_MAP

The CLI code has the ability to turn the ref into a UUID.

Signed-off-by: John Else <john.else@citrix.com>
(cherry picked from commit 30af00894c46132ae7cd62e6a3f5c8bb8259c1f7)
CP-9906: Improve SXM failure logging

Log that we don't know to where a VDI should be copied.

Signed-off-by: John Else <john.else@citrix.com>
(cherry picked from commit 6bd6d02860b4b49b54e240729d35af334d132c85)
CP-9906: Improve SXM failure error reporting

Raise a proper Api_error if we've failed to determine the destination to
which a snapshot VDI should be migrated.

Signed-off-by: John Else <john.else@citrix.com>
(cherry picked from commit 5042c2ca5fbe760e9c5ad7c935b894d62ac7c8e4)
Merge pull request #1980 from johnelse/sxm-workaround

Improvements to SXM failure logging and error reporting
Merge pull request #1977 from thomassa/trunk_hard_shutboot

CA-139501 VM hard_shutdown & hard_reboot must wait for nothing else.
Merge pull request #1979 from djs55/CA-148772

CA-148772: support consoles served over Unix domain sockets
Handle Rrdd_plugin interface change

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1996 from johnelse/rrdd-plugin-interface

Handle Rrdd_plugin interface change