Ensure MTU is set when the OVS vif driver is used

Set the MTU on the relevant devices when the OVS vif driver
is used:
    - veth devices
    - ovs vif device

Closes-bug: 1260697

Conflicts:

	nova/network/linux_net.py

Change-Id: I217f43227c099f17ab9a225b1ef7377d3de28114
(cherry picked from commit e34a085f7a524747dd93e9645c6e0e69631075d4)
libvirt: handle exception while get vcpu info

If an exception is raised while get a libvirt domain's vcpu info,
the update_available_resource periodic task will be failed, which
will result in the resource of this compute node will never be
reported.

This patch add an exception handling to avoid this situation.
Closes-bug: #1270008

Change-Id: I69109402416989fdaa421f8dbc72953bd067c407
(cherry picked from commit 844df860c38ac38550b8d1739fd53131cd7fd864)
hyperv: Retry after WMI query fails to find dev

During long stress runs the WMI query that is looking for
the iSCSI device number can incorrectly return no data.
If the query is retried the appropriate data can then be
obtained.

This commit adds a retry loop, calling
basevolumeutils.get_device_number_for_target to avoid this situation.
It also handles the case where the devices list returned in
get_device_number_for_target is empty.  The retry loop is
implemented with new mounted_disk_query_retry_count and
mounted_disk_query_retry_interval configuration options.

Unit tests have been added to check the good and bad paths for
get_mounted_disk_from_lun.

DocImpact
Closes-bug: 1247901
Change-Id: I082c4b1694efcd20cce65293cd330b7a0cf7d470
(cherry picked from commit d143540ad1b69ec93c2b7bfadd1f654c4d8c7a34)
Fix changes-since filter for list-servers API

On list-servers API, "changes-since" parameter filters out servers
which have been created at the same date as the specified timestamp.
For example, the following server is filtered out with "changes-since=
2013-12-05T15:03:25":

  mysql> select display_name, updated_at from instances;
  +--------------+---------------------+
  | display_name | updated_at          |
  +--------------+---------------------+
  | vm01         | 2013-12-05 15:03:25 |
  +--------------+---------------------+

This bug causes some Tempest test failures, if the timestamp of server
creations are the same as the "changes-since" timestamp in second unit.
In addition, the behavior would be wrong from the viewpoint of its name
which includes "since".

This patch chanegs the server list for including the ones created at
the specified timestamp.

Change-Id: Icc10a1363503b3553d810c6be20b86b3da7ac1a0
Closes-Bug: #1236585
(cherry picked from commit d87bd44d0211a633efd545dc7b2027a613897b85)
VMware: Always upload a snapshot as a preallocated disk

Currently, a snapshot operation always produces a preallocated
disk type. When the snapshot is uploaded to glance, the source
image metadata is uploaded with the new snapshot and then some
of the metadata properties are updated. The update doesn't
include the disk_type property, this can be problematic. If
the original image has a sparse disk type and a snapshot is
taken, then the snapshot which is a preallocated disk type is
uploaded to glance with the disk_type property set to sparse,
which creates a disk type mismatch and causes errors when a vm
is spawned from that snapshot. This patch addresses the issue
by correcting the image metadata used when uploading a snapshot
to glance.

Also, the image_upload function in vmwareapi/fake.py has been
modified to address the change. Any function call to
image_upload (from the unit tests) will assert that the
metadata for the image to be uploaded must have the disk_type
value to be preallocated.

Closes-Bug: 1247296
(cherry picked from commit 11e327f888a6dbde990d75196560083fddecf394)

Conflicts:

	nova/tests/virt/vmwareapi/test_vmwareapi.py
Change-Id: I71cfa8d4d1eb7911abb489153292fb0d1e614765
Merge "Ensure MTU is set when the OVS vif driver is used" into stable/havana
Merge "Fix changes-since filter for list-servers API" into stable/havana
Merge "VMware: Always upload a snapshot as a preallocated disk" into stable/havana
Merge "hyperv: Retry after WMI query fails to find dev" into stable/havana
Merge "libvirt: handle exception while get vcpu info" into stable/havana
Backport patches from icehouse/xenapi-pci-passthrough to havana but xenapi plugins.
Merge branch 'thouveng/havana/xenapi-pci-passthrough' of https://github.com/thouveng/nova into thouveng/havana/xenapi-pci-passthrough