libvirt: Make `fakelibvirt.libvirtError` match

When test code uses `libvirtError`, it may refer to
`libvirt.libvirtError` or `fakelibvirt.libvirtError` depending on
whether `libvirt-python` is installed.

The existing code had incompatible `__init__` singatures between the
two, meaning that a test could pass locally but fail when run on
Jenkins.

The solution is to make `fakelibvirt.libvirtError` match libvirt 1.2.3
exactly.

A convenience function, `make_libvirtError`, is introduced so that
exceptions can still be created in one shot.

Change-Id: I5aaecc57504c4aea3c049610ef188978c25cfdc4
Closes-Bug: 1305186
(cherry picked from commit 78156a7650237bd4875fbbf9cad8db87348f333f)
libvirt: Handle unsupported host capabilities

Neither libvirt-xen nor libvirt-lxc support
VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES so check for the proper error
code that is returned by libvirt.

The existing code was performing this check improperly by trying to
catch an enum value; instead, we need to catch the `libvirtError`
exception and then check its return code.

Co-Authored-By: Rick Harris <rconradharris@gmail.com>
Co-Authored-By: Andrew Melton <andrew.melton@rackspace.com>
Closes-Bug: 1297962
Change-Id: Ie8bf5c9d1f2a27c387f8b2f54a9bb729fa2f0985
(cherry picked from commit 5fc157e0f5245eb79be90cbc8ed545c396fd38af)
Bump stable/icehouse next version to 2014.1.4

Change-Id: I1b2e9b58d2eccbe4e7a00b1549adcdcea5845afb
Raise descriptive error for over volume quota

If you attempt to create a new instance booting from an image and you
were over your quota on cinder, the nova manager would see that as an
invalid block device. This raises a more descriptive error message in
the logs.

Closes-bug: #1013417
Change-Id: Ie50b97c31580da7fc38c6891d1f3646b91f8aa10
(cherry picked from commit 4711ff3adff2b4c9a54f5fb4448ace6558f82f6b)
Fixes Hyper-V volume mapping issue on reboot

Hyper-V does not manage iSCSI mounted passthrough disks
correctly on reboot in some circumstances where disk
number assignment can change, resulting in instances potentially
booting with the wrong volume attached.

Co-Authored-By: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
Co-Authored-By: Adrian Bora <abora@cloudbasesolutions.com>

Closes-Bug: #1322926
(cherry picked from commit 50636a881b60f112027494bcd84af66888db8c1c)

Conflicts:
	nova/tests/virt/hyperv/test_vmutils.py
	nova/tests/virt/hyperv/test_vmutilsv2.py
	nova/virt/hyperv/vmutils.py
	nova/virt/hyperv/vmutilsv2.py

Change-Id: I99fa75aaa950de2ada8a03bd23c910c3ff810d69
VMware: prevent race condition with VNC port allocation

When spawning some instances, nova VMware driver could have a race condition
in VNC port allocation. This fix ensures that the lock is done on the
actual setting in the VM configuration spec.

Co-authored-by: Marcio Roberto Starke <marcio.starke@serpro.gov.br>

Change-Id: I70fab021bbf2df418df53e5f47e19cf16dbe45ac
Closes-bug: #1357372
(cherry picked from commit 948ff4f3d0a159f1aed9fab65d205ede845b3eb9)
Merge "Raise descriptive error for over volume quota" into stable/icehouse
Merge "libvirt: Make `fakelibvirt.libvirtError` match" into stable/icehouse
Merge "libvirt: Handle unsupported host capabilities" into stable/icehouse
Sync process utils from oslo

This patch backports the missing change to fix ssh_execute password leak

------------------------------------------------
The sync pulls in the following changes:

105169f8 - Mask passwords in exceptions and error messages (SSH)
-----------------------------------------------

Closes-Bug: 1377981
Change-Id: Ie0caf32469126dd9feb44867adf27acb6e383958
VMWare: Fix VM leak when deletion of VM during resizing

During the VM resizing, before VM arrive RESIZED state, driver
migrate_disk_and_power_off will initially rename orginal vm
'uuid' to be 'uuid-orig' and clone a new vm with 'uuid' name.
When deletion VM is triggered at this time window, it wouldn't
be able to delete the VM uuid-orig in VCenter and so cause VM leak.
As VM task state will be set to 'deleting' and it can not be used to
determine the resize migrating/migrated state, this fix will
attempt to delete orig VM within destroy phase.

Conflicts:
	nova/tests/virt/vmwareapi/test_driver_api.py
	nova/virt/vmwareapi/vmops.py

Closes-Bug: #1359138

NOTE: the aformentioned patch broke Minesweeper. The fix was also
cherry picked from commit e464bc518e8590d59c2741948466777982ca3319.
This was to do two things:
1. Solve the actual bug
2. Ensure that the unit tests and Minesweeper passed

Change-Id: I7598afbf0dc3c527471af34224003d28e64daaff
(cherry-picked from e1f8664c9fa83f77f5bb763ffcc3157905ed954c)
Merge "Fixes Hyper-V volume mapping issue on reboot" into stable/icehouse
Merge "VMware: prevent race condition with VNC port allocation" into stable/icehouse
Merge "VMWare: Fix VM leak when deletion of VM during resizing" into stable/icehouse
Merge "Sync process utils from oslo" into stable/icehouse