Add option to make exception format errors fatal.

Adds a new fatal_exception_format_errors config option which
defaults to False. This option is use to control how the base
NovaException class handles errors which can occur when it
formats error messages.

The motivation for this change is to be able to enable exception
format checking in our tests by setting
fatal_exception_format_errors=True.

Change-Id: Ie96261ed96bcede4a2b5ec5600cb93c15141a800
Make NBD retry logic more generic, add retry to loop.

Other device implementations require retry logic as well. This
change pushes the retry logic up one layer so that its easy to
implement for the other drivers that will benefit from it, and
then adds retry to the loop driver.

This change also adds some unit test coverage for the loop
driver.

Change-Id: Iab0d42d5075e9d50b4e7eb8c7fcef12cae281b40
Add an iptables mangle rule per-bridge for DHCP.

When vhost-net is present on a host, and DHCP services are
run on the same system as guests (multi_host), an iptables
rule is needed to fill packet checksums.  This adds a rule
per-bridge for multi_host networks when vhost-net is present,
similar to how newer versions of libvirt handle the issue for
bridges/networks that it manages.

Fixes LP: #1029430

EDIT: Updated tests and pep8.

Change-Id: I1a51c1d808fa47a77e713dbfe384ffad183d6031
Make load_network_driver load passed in driver.

Small fix to the load_network_driver function so that it
loads the driver we pass in as a variable rather than always using
CONF.network_driver.

Change-Id: I9afbbd87bde07ad9d425512dce37b54fd5e3b21e
Add .testrepository/ directory to gitginore

Change-Id: Ib46a3d996e54c249773ac3c45960d471d21d2357
Move aggregate_get() to conductor

This moves the final remaining aggregate DB operation from the
compute/manager to conductor/manager.

Related to bp/no-db-compute-manager

Change-Id: I1ec6b64d29da21f978f7b72a1f8271fe68e3a44d
Add expected exception to aggregate_metadata_delete()

This adds a missing client_exceptions() decorator to the conductor's
aggregate_metadata_delete() method, which was missed due to the
timing of when the patches landed. With this, all expected exceptions
in conductor's current set of operations should be properly marked.

Related to bp/no-db-compute-manager

Change-Id: Ifa8cdcb1c7e93aeb95f5dc4fe2e294fe0165cdc5
Merge "Add option to make exception format errors fatal."
Merge "Make load_network_driver load passed in driver."
Define a product, vendor & package strings in version.py

To have one single place where all code in Nova can access
product, vendor & package strings, extend version.py to
expose a product_string(), vendor_string() and package_string()
methods. The product will default to "OpenStack Nova", the
vendor to "OpenStack" and the package to None. The latter is
intended solely for OS distro vendors to include their package
version suffix (eg the "Release:" field from RPM or perhaps
a VCS tag)

Following changes will make this data configurable via a
plain text file, and then update various parts of Nova to
make use of the data.

Change-Id: I3eb14d11f8949ce909a8f529851913d3dccf0e8c
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Merge "Make NBD retry logic more generic, add retry to loop."
Remove obsolete VCS version info completely

The VCS version string in nova/version.py has been hardcoded
to 'LOCALBRANCH:LOCALVERSION' since change

  0bbb0e8cb1daa351af91cf97b2bcababfc0c7f9f

The only places which use this info are some logging calls,
and since 'nova-manager version' command. The latter would
more usefully output the distro specific package string.

Delete the VCS related methods in version.py and replace their
usage with a new method version_string_with_package() which
appends the distro-specific package tag

Change-Id: I972b79c329198cb5376d537c6b672830094cd759
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Allow loading of product/vendor/package info from external file

Currently the version.py file hardcodes some basic info for
the NOVA_PRODUCT, NOVA_VENDOR and NOVA_PACKAGE constants. It
is desirable that OS distro vendors can override/extend this
data in packages they ship. Cloud providers may also desire
to do the same. This allows Nova to optionally load this
data from a /etc/nova/release file. That file should contain
the data in a trivial "ini" format. For example:

  [Nova]
  vendor = Fedora Project
  package = 1.fc18

Note that vendor sare not required to override all strings.
In this example, the 'product' field is not set, leaving
it on the default 'OpenStack Nova' value.

Change-Id: I3d8d32eaf35268c4b0908b0a93b7c9a2ea9c580a
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Make configdrive.py use version.product_string()

Instead of hardcoding 'OpenStack nova' for the publisher
when building ISO images, use version.product_string().
Also append the package version suffix, if any.

Change-Id: If3dfbf895ef7037e15dd3ff8da8f47daecb4d24a
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Export custom SMBIOS info to QEMU/KVM guests

Provide custom SMBIOS data to QEMU/KVM guests, so that they can
reliably detect the fact that they're running on an OpenStack
platform. Guest OS vendors often need info about the host
virtualization platform to apply the correct billing process
for virtual machines.

Looking at 'dmidecode' in the guest will show something akin
to

  ...snip...
  Handle 0x0100, DMI type 1, 27 bytes
  System Information
        Manufacturer: OpenStack Foundation
        Product Name: OpenStack Nova
        Version: 2013.1-dev
        Serial Number: 35363738-393a-3b3c-3d3e-3f4041424344
        UUID: 2BAFB510-B7DB-4117-A609-452B6E2BD718
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: Not Specified
  ...snip...

Change-Id: I5cdd75cd06ee872e5665f06926951b340ff2f57f
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Merge "Add .testrepository/ directory to gitginore"
Merge "Move aggregate_get() to conductor"
Merge "Add expected exception to aggregate_metadata_delete()"
Make libvirt driver.listinstances return defined

Currently the Libvirt driver list_instances doesn't return
defined instances. Those instances required during host initialization
for blueprint rebuild-for-ha

DocImpact

Change-Id: Ifb8f703daa4962f4570c53c75c3d66bc5e5132e7
Co-authored-by: Oshrit Feder <oshritf@il.ibm.com>
Merge "Add an iptables mangle rule per-bridge for DHCP."