CA-116551: Prevent xenguest from creating extra log files.
Signed-off-by: Akshay <akshay.ramani@citrix.com>
CA-137044: XAPI shall handle the WLB disconfigure error according to CA-60147,CA-93312
Signed-off-by: Zheng Chai <zheng.chai@citrix.com>
Add configurable idle timeout to stunnel

Imported from xcp-inventory.git 13735def832bff388e6d01c34645a4cef3fc73eb

Signed-off-by: Akshay <akshay.ramani@citrix.com>
Imported-by: John Else <john.else@citrix.com>
Add a configurable idle timeout to stunnel

Imported from xen-api.git 53ef46d2491bad21366ffa63cadcc59adfbca34c

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Imported-by: John Else <john.else@citrix.com>

Conflicts:
	ocaml/xapi/xapi.ml
Merge pull request #1771 from akshayramani/CA-116551

CA-116551: Remove the extra log files created by xenguest
Merge pull request #1779 from johnelse/ca-129196-xs64bit

Add a configurable idle timeout to stunnel
Merge pull request #1776 from Zhengchai/xs64bit-ring3

CA-137044: XAPI shall handle the WLB disconfigure error according to CA-60147,CA-93312
CA-136885: Populates the gateway and dns fields for DHCP pifs

Signed-off-by: Ravi Pandey <ravi.pandey@citrix.com>
Merge pull request #1781 from ravippandey/ca-136885

CA-136885: Populates the gateway and dns fields for DHCP pifs
CA-134972: fix a tight loop getting xenops updates

Each barrier injected among the xenops events now holds a snapshot of
the event id counter as well as the set of events. The get function uses
this to select only the barriers newer than the "from" parameter, and
returns it as the "id of latest thing found" if it is newer than all the
events. If there are no barriers or events to return then the function
waits: this behaviour is unchanged, but now there will be no barriers to
return if there are barriers but they are all too old to be of interest
to the caller.

This means a client no longer keeps calling repeatedly with the same
"from" and getting back the same result (one or more barriers, no events
and the same next-id as the "from" param).

Because each barrier has an extra int associated with it, the formats
for RPC and Dump have changed in a backwards-incompatible way.

This commit also adds just a little debug-logging.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Merge pull request #1784 from thomassa/xenopsloop-ca-134972

CA-134972: fix a tight loop getting xenops updates
CA-137238: Revert "CA-90424: Does not migrate VDI if it is already migrating."

The added assert meant that we couldn't make use of the queuing
functionality of VM.with_vm_operation. After the change which this
commit reverts, if one of a VM's disks was undergoing a VDI.pool_migrate
then attempting to VDI.pool_migrate another of the VM's disks would fail
immediately with OTHER_OPERATION_IN_PROGRESS.

After reverting this commit, the second VDI.pool_migrate gets queued up
behind the first.

This reverts commit 8598ea5b2dcda479a0c01ee081a3f7f999091087.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1785 from johnelse/ca-137238-xs64bit

CA-137238: Revert "CA-90424: Does not migrate VDI if it is already migrating."
CP-8358: Don't filter out quotes before parsing lspci output

Instead take them into account when doing the sscanf.

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Rename field pci.id to pci.pci_id

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Decompose Xapi_pci_helpers.pci into a collection of int64/string pairs

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Add subsystem IDs to PCI objects

PCI objects now have four new fields:

* subsystem_vendor_id
* subsystem_vendor_name
* subsystem_device_id
* subsystem_device_name

If a device doesn't implement these IDs then the fields will be left as
empty strings in the database.

If a device implements the IDs but the IDs are not present in pci.ids,
then the names will be set to "Unknown (xxxx)" where xxxx is the
corresponding ID.

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Log the new pci fields after test failures

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Add more tests of lspci subsystem ID parsing

Signed-off-by: John Else <john.else@citrix.com>
CP-8358: Typo fix in comment

Signed-off-by: John Else <john.else@citrix.com>