CA-97883: Wrap the fstat call in an exception handler

We can get an exception when we're fstatting a file that's larger
than is representable in a signed 32-bit integer (ie., 2 gigs).
If this happens, it's clearly not a socket, so don't bother setting
the TCP timeout parameters.

This patch is actually a bit more defensive, and ignores any
exception thrown here.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CP-2190 for PR-1221: monitor memory_free_kib instead of memory_total_kib

Also fix an Exception string.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Fixed the description of memory_total_kib rrd datasource.
It is memory "in the host", not "in use".

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
CA-89875: RRDD skips reading "/local/domain/0/data/meminfo_free"
Fix bridge name selection for vswitch mode in scripts/setup-vif-rules
  -        bridge_name = "xenbr%s" % devid
  +        bridge_name = get_bridge_name_vswitch(vif_name)

  Devid is device number for domU (f.e. vif1.15; 15 - devid) and is definitely NOT a
  xenbr number (xenbr0, xenbr1, etc).

Signed-off-by: George Shuklin <george.shuklin@gmail.com>
Merge pull request #953 from selectel/master

Fix to setup-vif-rules
Merge pull request #989 from jonludlam/CA-97883

CA-97883: Wrap the fstat call in an exception handler
Merge pull request #992 from siddharthv/CA-89875

CA-89875: RRDD skips reading "/local/domain/0/data/meminfo_free"
Merge pull request #991 from thomassa/pr1221

CP-2190 for PR-1221: fix memory monitoring
XOP-261: Revert.

    XOP-261: Reinstate the server on 127.0.0.1 when no management
    interface is defined

    XOP-261/CA-96936: Remove Xapi_mgmt_iface.rebind
    Since the management interface is listening in IPv6 automatically if
    available.

    XAPI-261/CA-96936: Make himn_only more general
    To also manage the case of a localhost server.

    XOP-261/CA-96936: Prevent multiple starts of localhost server

    XOP-261/CA-96936: Issue a warning in case of multiple starts of HIMN server

Reverted since it broke TC-16120.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Merge pull request #1008 from jeromemaloberti/XOP-261-revert

XOP-261: Revert.
CA-98528: Improve the CLI error message when setting vmpp params

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #1009 from jonludlam/CA-98528

CA-98528: Improve the CLI error message when setting vmpp params