xe console should not be hidden command

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
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
CA-96886: Fix race for a PCI device by multiple starting VMs

When multiple simultaneously starting VMs try to grab the same PCI device, only one of them
may get it, and the others must fail to start. However, xapi considers a PCI device "assigned"
to a VM only when the VM has started and the device has been made available to the VM, which
is some time after xapi has asked xenopsd to start the VM and give it the PCI device. This means
that there is a window during which multiple VM may be given the same device.

This patch attempts to resolve this by temporarily reserving a PCI device for a VM in xapi, before telling xenopsd to start the VM.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
XOP-229: Make xenopsd using keep_alive.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-229: Make rrd_updates uses keep_alive=true.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-98535: Fix VDI.create

The other_config, shareable, tags and xenstore_data fields are now set
to their correct values when creating a VDI.

Signed-off-by: John Else <john.else@citrix.com>
xenopsd: Support driver domains for PV guests

The case of HVM guests with emulated QEMU networks devices is not yet
handled.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Allow setting the VIF backend for a network

If, on a network, other_config:backend_vm is set to the UUID of a VM, this VM is
used for the VIF backends (netback) of any VIFs on the network.

This is useful for internal networks (only), since the key is set on a network
rather than on a PIF.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Whitespace: xapi_sr.ml

$ camlp4o -printer o -no_comments ocaml/xapi/xapi_srl | md5sum
7760aa8c3f302bc5ebca565b2c83b483  -
$ git checkout HEAD^
$ camlp4o -printer o -no_comments ocaml/xapi/xapi_sr.ml | md5sum
7760aa8c3f302bc5ebca565b2c83b483  -

Signed-off-by: John Else <john.else@citrix.com>
CA-98633: Raise SR_UUID_EXISTS in SR.introduce if an SR with the same UUID already exists.

Signed-off-by: John Else <john.else@citrix.com>
CA-74544: Associate a username with the sessions xapi passes to SM backends.

This will appear in the audit log. Formatting is consistent with the
"__dom0__vmpr" username associated with the session passed to the VMPR
plugin.

Signed-off-by: John Else <john.else@citrix.com>
CA-94335: Dom0 should be managed in xenopsd before the record is created.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>