Fix wrong command for _rescan_multipath

The _run_multipath command is wrong in [1], it should be 'multipath -r'
not 'multipath - r'. And adds test for this.

[1]: https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume.py#L590

Change-Id: I3c5d12cc11988d65a8fc9e6143d26c2d1220d253
Closes-bug: 1362916
Fixes Hyper-V boot from volume root device issue

Checks that instances are booting from volume by checking
the correct root device obtained from the block device info.

Change-Id: I94941dfe96c1596c8e9b91df3d3d19d33ae7fe92
Co-Authored-By: Zsolt Dudas <zdudas@cloudbasesolutions.com>
Closes-Bug: #1357972
Make floatingip-ip-delete atomic with neutron

The infra guys were noticing an issue where they were leaking floating ip
addresses. One of the reasons this would occur for them is they called
nova floating-ip-delete which first disassocates the floating-ip in neutron
and then deletes it. Because nova-api makes two calls to neutron if the
first one succeeds and the second fails it results in the instance no longer
being associated with the floatingip. They have retry logic but they base it on
the instance and when they go to retry cleaning up the instance the floatingip
is no longer on the instance so they never delete it.

This patch fixes this issue by creating a new method
disassocate_and_delete_floating_ip which contains the different logic
needed to atomically do this for neutron rather than putting the logic
in the api layer to do something differently if one is using neutron.

This patch also adds additional code coverage for nova-network in the
delete floatingip case.

Closes-bug: 1356157
Change-Id: I53b0c9d949404288e8687b304361a74b53d69ef3
Fix instance boot when Ceph is used for ephemeral storage

is_block_dev attribute was mistakenly set to True for RBD images
(we don't actually map RBD images to block devices in the *host*
system, but only in *guests*, so as far as the host system is
concerned an RBD image must not be treated like a system block
device). This led to a situation when mkfs was called for a non
existing file and failed when trying to create an ephemeral fs.

Closes-Bug: #1362221

Change-Id: I54c0d117a53bb61f278b2e137bd29a595548f5a1
Add API schema for v2.1 "update a server" API

Some v2.1 APIs(create/update/rebuild server) contains the API
extension feature, it searches extension methods with its method
name and operates them automatically.
It is necessary to change the API schemas also automatically based
on the API extension loading condition, because the API extensions
add API parameters.

This patch adds API schema extensions which are implemented with the
same mechanism (stevedore library) as the API extension for "update
a server" extensions.

Partially implements blueprint v3-api-schema

Change-Id: I2f80a994bc69153bd40251827aad0479876a94ab
Add API schema for v2.1 "rebuild a server" API

Some v2.1 APIs(create/update/rebuild server) contains the API
extension feature, it searches extension methods with its method
name and operates them automatically.
It is necessary to change the API schemas also automatically based
on the API extension loading condition, because the API extensions
add API parameters.

This patch adds API schema extensions which are implemented with the
same mechanism (stevedore library) as the API extension for "rebuild
a server" extensions.

Partially implements blueprint v3-api-schema

Change-Id: Ibfdd99966335d062cde4cc1d9ab3b63bc82ed0b6
Support image property for config drive

Currently Nova decides the config_drive based on user input and compute
node configuration. We should also consider the image requirement for
config drive.

Implements: blueprint config-drive-image-property

DocImpact:
    An new image metadata support added.

Change-Id: Ica32fb078d5440dbcf1251175585d34af9549815
Fix race condition with vif plugging in finish migrate

The tempest test that does a resize on an instance from time to time fails
with neutron with a virtual interface timout error. The reason why this
occurs is that nova-compute calls a vifs_unplug() then vifs_plug() fairly
quickly and the neutron-agent doesn't realize this happens because the way
it detects this is via polling. This patch fixings this problem by passing
vifs_already_plugged=True to _create_domain_and_network to avoid waiting
for the neutron notifcation.

Initially, I thought this problem could be solved by setting
vifs_already_plugged=True if migrate.source_host == migrate_desk.dest_host
but it turns out that this race condition can still occur if migrated to
another host though it's fairly unlikely. Always setting
vifs_already_plugged=True ensures we never hit this issue on migrate.

Change-Id: I90424ad50ac993c4abb049aa0654a94b225b5ebb
Closes-bug: 1357599
Closes-bug: 1357476
Merge "Fixes Hyper-V boot from volume root device issue"
Merge "Fix race condition with vif plugging in finish migrate"
Merge "Make floatingip-ip-delete atomic with neutron"
Merge "Fix wrong command for _rescan_multipath"
Merge "Fix instance boot when Ceph is used for ephemeral storage"
Merge "Support image property for config drive"
Merge "Add API schema for v2.1 "update a server" API"
Merge "Add API schema for v2.1 "rebuild a server" API"