Fixes snapshot instance failure on libvirt.

Fixed the failure during snapshotting instance (on libvirt) due to incorrect
attribute access.

Fixes LP: #1075556

Change-Id: I079467d38aef5071488084f9bfa080a2a5af2609
Include hostname in notification payloads.

Moniker is going to want this in order to autogenerate
certain DNS records.

Change-Id: I3a9a6afb88712a297397493d310d55abcc63897e
'BackupCreate' rotation parameter >= 0

In the extension 'admin-actions' of OpenStack Compute API, the action
create backups should only accept rotation parameter greater than or
equal to zero.

If the 'rotation' parameter is negative, OS API returns a badRequest
400 HTTP error.

Fixes LP bug #1071168

Change-Id: I6ef08fbecb0f88942cdb16193e9d2c3831866fe9
Yield in between hash runs for the image cache manager.

This should stop the cache manager from locking up nova-compute for
long periods of time.

Change-Id: Icc510a55282b479b3ba673ac68aee793da1714fb
Enable Quantum linux bridge VIF driver to use "bridge" type

Fixes bug 1078210

This fix should be used in conjunction with the patch
https://review.openstack.org/#/c/14961/

Change-Id: Ifd79864db147fe3141e03bf1c931fd153d413305
Fixed HyperV to get disk stats of instances drive

It fixes bug 1077922

The current version of the HyperV Compute driver was returning the disk stats about the C: drive always.

This patch makes HyperV driver extract the current drive from the flag 'instances_path'.

In order to optimize the procedure, the disk stats extraction is also unified in one method.

Change-Id: I4920cf2cc07d0f514c0358144b7bceb15d439a63
Adds a conf option for custom configdrive mkisofs

In order to support ConfigDrive on Hyper-V an option for supporting
a customizable mkisofs / genisoimage is needed, including optional
path.

The option "mkisofs_cmd" deafult to "genisoimage" to preserve
backwards compatibility

Change-Id: I89167bf77bddae9a0f989874ad0a972d7898a903
Remove unused volume exceptions

part of bp delete-nova-volume

Change-Id: I1285528ef0c2aff0f3dfea9faf2b28c55eb10a51
Added bare-metal host manager.

Part 6 of 6: blueprint general-bare-metal-provisioning-framework.

The bare-metal host manager is used when multiple bare-metal
instances are created by one request. The bare-metal host manager
detects if a nova-compute is for VM or bare-metal.
For VM instance provisioning, it simply calls the original host_manager.
For bare-metal instance provisioning, BaremetalNodeState is used
to manage bare-metal node's resources when an instance is provisioned
to a bare-metal node.

Change-Id: Ib207f495493db99a4a6cd1ac0044662fb7397322
Co-authored-by: Mikyung Kang <mkkang@isi.edu>
Co-authored-by: David Kang <dkang@isi.edu>
Co-authored-by: Ken Igarashi <igarashik@nttdocomo.co.jp>
Co-authored-by: Arata Notsu <notsu@virtualtech.jp>
Added separate bare-metal MySQL DB.

Part 2 of 6: blueprint general-bare-metal-provisioning-framework

In baremetal provisioning, one nova-compute manages multiple bare-metal
machines. A bare-metal machine does not run openstack at all.
Previously, bare-metal provisioning used text files to store information
of bare-metal machines. In this patch, a MySQL database is used to store
the information. We target only MySQL database. The DB is designed to
support PXE/non-PXE booting methods, heterogeneous hypervisor types, and
architectures. Using a MySQL database makes maintenance and upgrades
easier than using text files. The DB for bare-metal machines is
implemented as a separate DB from the main Nova DB. The DB can be on any
machines/places. The location of the DB and its server needs to be
specified as a flag in the nova.conf file (as in the case of glance).
There are a couple of reasons for this approach. First, the information
needed for bare-metal machines is different from that for non-bare-metal
machines. With a separate database for bare-metal machines, the database
can be customized without affecting the main Nova DB. Second, fault
tolerance can be embedded in nova-compute. Since one nova-compute
manages multiple bare-metal machines, fault tolerance of a nova-compute
node is very important. With a separate DB for bare-metal machines,
fault-tolerance can be achieved independently from the main Nova DB.
Replication of the bare-metal DB and implementation of fault-tolerance
are not part of this patch. The implementation models nova and its DB as
much as possible. The bare-metal driver must be upgraded to use this DB.

Change-Id: I7b7ba1903a672a50c567f95fc6554d119463b0c5
Co-authored-by: Mikyung Kang <mkkang@isi.edu>
Co-authored-by: David Kang <dkang@isi.edu>
Co-authored-by: Ken Igarashi <igarashik@nttdocomo.co.jp>
Co-authored-by: Arata Notsu <notsu@virtualtech.jp>
Adds REST API support for Fixed IPs

This adds an extension that provides a REST API for getting information
about a fixed ip, reserving a fixed ip and unreserving a fixed ip. The
interface is accessed via

/v2/{tenant_id}/os-fixed-ips/<ip_address> # GET ip info
/v2/{tenant_id}/os-fixed-ips/<ip_address>/action # POST reserve/unreserve ip

This forms part of the work to provide APIs for functionality currently
implemented by nova-manage that needs direct db access so nova-manage
can eventually be removed

Adds db function fixed_ip_get_by_address_detailed in order to optimise being able
to get the instance and network information for a fixed ip at the same
time as the rest of the fixed ip information

Change-Id: I92edf4e6b74b14bb9c49d5bc0c79e40d3a496bc5
Implements: blueprint apis-for-nova-manage
DocImpact
Sync latest code from oslo-incubator.

Change-Id: I463a6d934d17f3374763472cee7291234238c50d
Check instance_type in compute capability filter

Instance type is guaranteed to exist and not be None or empty dict
as a quite a while ago, although it used to be that prep_resize
didn't have it.

Remove the checking for instance_type.

Change-Id: I391615114bd9d9359eeb0b2b3642dcec86a8285e
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
update nova.conf.sample.

created by using generate_sample.sh.

Change-Id: I0b5a20b8a77d5d87bb0f8497f74a19eb5bbd2d06
Refactor scheduling weights.

This makes scheduling weights more plugin friendly and creates shared
code that can be used by the host scheduler as well as the future cells
scheduler.  Weighing classes can now be specified much like you can
specify scheduling host filters.

The new weights code reverses the old behavior where lower weights win.
Higher weights are now the winners.

The least_cost module and configs have been deprecated, but are still
supported for backwards compatibility.  The code has moved to
nova.scheduler.weights.least_cost and been modified to work with the new
loadable-class code.  If any of the least_cost related config options are
specified, this least_cost weigher will be used.

For those not overriding the default least_cost config values, the new
RamWeigher class will be used.  The default behavior of the RamWeigher
class is the same default behavior as the old least_cost module.

The new weights code introduces a new config option
'scheduler_weight_classes' which is used to specify which weigher classes
to use.  The default is 'all classes', but modified if least_cost
deprecated config options are used, as mentioned above.

The RamWeigher class introduces a new config option
'ram_weight_multiplier'.  The default of 1.0 causes weights equal to the
free memory in MB to be returned, thus hosts with more free memory are
preferred (causes equal spreading).  Changing this value to a negative
number such as -1.0 will cause reverse behavior (fill first).

DocImpact

Change-Id: I1e5e5039c299db02f7287f2d33299ebf0b9732ce
Merge "Adds REST API support for Fixed IPs"
Merge "Sync latest code from oslo-incubator."
Merge "update nova.conf.sample."
Merge "Refactor scheduling weights."
Merge "Check instance_type in compute capability filter"