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>
PR-1510: LACP timeout, aggregator/actor parameters settable

LACP timeout, aggregator/actor parameters are now settable through XenAPI and
CLI. New bond parameters are lacp-time, lacp-aggregator-key and lacp-actor-key.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Refactor Network_utils.Ovs to functorize vsctl commands for testing

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
PR-1510: add unit tests for LACP params setting

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
PR-1510: bond parameters either have defaults or are omitted

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
PR-1510: More test cases

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Remove unecessary debug line

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Trim trailing whitespace.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Use a consistent indentation style.

For want of a better standard, use the Xen prefered style.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Correct sementics of syslog() calls.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Make use of /proc/self/

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Fix typo in branding for XCP 1.6 docs

Signed-off-by: John Else <john.else@citrix.com>
CA-98753: Correct ha_restart_priority for VMs imported on post-6.0.0

Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
CA-100000: Don't use lexicographic sort when sorting events

Bug introduced during rpc-light integration. The type of 'id' was
changed from an int to a string, and the type checker used to fix
the code. Unfortunately there was a sort function using the
polymorphic 'compare' function. The compare thus changed from an
integer comparison to a lexicographic compare on the string
representation of the integer. The observable result in this case
was that e.g. event '1000' was 'older' than event '999' and was
GCd. Elsewhere, the correct integer comparison was being made and
this caused the event.next to raise 'EVENTS_LOST'.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge branch 'master' of git://hg/carbon/trunk/xen-api
CA-99728: Spelling errors.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@citrix.com>
Don't log every readonly API call.

This causes the periodic SR.scans to produce a lot less log spam - these
lines make up about 20% of xensource.log at the moment if there is an SR
being autoscanned.

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

This line gets logged three times for each SR.scan (to both
/var/log/xensource.log and /var/log/messages), and the information is
already available in the SM.features field in the DB.

Signed-off-by: John Else <john.else@citrix.com>
Remove unused module imports

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #1043 from johnelse/docs-typo

Fix typo in branding for XCP 1.6 docs