Commit Graph

20978 Commits

Author SHA1 Message Date
Jenkins 00d0e2c187 Merge "Return Customer's Quota Usage through Admin API" 2013-06-11 20:39:00 +00:00
Jenkins 9b5e206027 Merge "Rename functions in nova.compute.flavors from instance_type" 2013-06-11 19:49:12 +00:00
Jenkins da472b13c4 Merge "xenapi: ensure instance metadata always injected into xenstore" 2013-06-11 18:27:59 +00:00
Jenkins 3f2b5fdd83 Merge "Nova instance group DB support" 2013-06-11 18:17:56 +00:00
Joe Gordon b7fe4e206b Rename functions in nova.compute.flavors from instance_type
Second step in removing references to instance_types. Remove all
references to instance_type in nova.compute.flavors.
Also update compute devref to reflect changed name.
Partially implements bp flavor-instance-type-dedup

renamed:  nova/tests/test_instance_types.py -> test_flavors.py

Change-Id: I7413bf832c61d04ab90ec8b1370d3f01372c4172
2013-06-11 10:36:39 -07:00
John Garbutt 0107ce638b xenapi: ensure instance metadata always injected into xenstore
It is possible to use the agent, cloud-init and config drive
together on a single server. In this case we should still
be injecting the instance metadata.

The current code is inconsistent between spawn and migrations.

The correct approach is to always inject the data into xenstore.

fixes bug 1188618

Change-Id: I253b34234544cff353985a5b53ec084ea332535a
2013-06-11 10:44:53 +00:00
Jenkins 685228d96b Merge "Handle security group quota exceeded gracefully" 2013-06-11 10:36:48 +00:00
Jenkins 6c79b752b6 Merge "Normalize path for finding api_samples dir" 2013-06-11 10:36:21 +00:00
Gary Kotton 501ff418df Nova instance group DB support
DB support for blueprint instance-group-api-extension

Change-Id: I615af9826ef61fd63d4cd8017908f943969bf177
2013-06-11 08:50:50 +00:00
Jenkins a79eea05db Merge "Add missing tests for s3_image_* methods" 2013-06-11 08:09:29 +00:00
OpenStack Jenkins 63d0ff2c48 Merge "Imported Translations from Transifex" 2013-06-11 06:18:25 +00:00
Jenkins ef1db0aeb5 Merge "Cleanup nova exception message conversion" 2013-06-11 05:04:35 +00:00
Jenkins a657af5fd5 Merge "Create an image BDM for every instance" 2013-06-11 02:40:30 +00:00
Jenkins 45e80dfdb2 Merge "DB migration to the new BDM data format" 2013-06-11 02:39:43 +00:00
Jenkins e40f78b0da Merge "Refactors scheduler.chance.select_hosts to raise NoValidHost" 2013-06-10 23:31:30 +00:00
Jenkins 2728c4ef70 Merge "Fix db.models.Service description" 2013-06-10 23:31:06 +00:00
Jenkins 5bfa143c56 Merge "Fix dangling LUN issue under load with multipath" 2013-06-10 23:30:50 +00:00
Nikola Dipanov 41eb083d22 Create an image BDM for every instance
This patch makes every boot create a block device mapping if the
instance was started with an image.

These block devices are not used anywhere at the moment but will be used
in the future as part of a more flexible block device API.

This patch also makes sure they are deleted once the instance is deleted
as well.

Change-Id: Ia89d531be71c460f1f82fcfce34b270639a23061
blueprint: improve-block-device-handling
2013-06-10 23:10:39 +00:00
Nikola Dipanov 0d5fb06b39 DB migration to the new BDM data format
This patch migrates the DB to the new data format. In addition it also
utilizes routines introduced in the change
I9370333059b8c9aaf92010470b8475a913d329b2 in a way that will allow us
to transition into using the new data in Nova logic one step at a time.

This is accomplished in a following manner in the DB/conductor layer,
which is supposed to allow for subsequent changes to be as granular as
possible:

* Read operations - data is always read as is found in the DB - meaning
in the new format, and transformed after every call. This will allow us
to make granular changes in the API/Compute layers.

* Data is converted inside the DB methods that do writes, and an
additional 'legacy' flag is added (set to True by default). It is up to
the calling method to make sure it supplies the DB layer with the format
it is intending to write, to avoid guessing.

An exception to the above is when using conductor due to rpcapi
versioning, so this patch adds a 'legacy' flag to the
block_device_mapping_get_all_by_instance conductor method and bumps the
version of the API.

This patch also fixes some of the block device fixtures in tests, when it was
required to be aware of the new data structure (mostly when mocking DB
methods that return the new data format).

This patch is not supposed to provide any new functionality to Nova.

blueprint: improve-block-device-handling

Change-Id: If30afdb59d4c4268b97d3d10270df2cc729a0c4c
2013-06-10 23:10:37 +00:00
Jenkins f85e4ec079 Merge "Removed code duplication in conductor.api" 2013-06-10 22:33:52 +00:00
Jenkins 2d017a2288 Merge "Enhance group handling in extract_opts" 2013-06-10 22:30:11 +00:00
Jenkins bfc1065fc1 Merge "Add missing conversion specifier to ServiceGroupUnavailable" 2013-06-10 22:29:54 +00:00
Walter A. Boring IV 080476b2d3 Fix dangling LUN issue under load with multipath
This fixes an issue where not all of the LUNs are seen
by the kernel at attach time, but later become available.
We now rescan the list of devices seen by multipath at
detach time.

Also added another unit test case.

Fixes Bug: #1175366

Change-Id: Id5b313b17454ec32672373b7b564b9450466b7a2
2013-06-10 14:10:03 -07:00
Jenkins 9116b2448e Merge "Converts 'image' to json primitive on compute.rpcapi.prep_resize" 2013-06-10 20:43:08 +00:00
Jenkins 71364c57f4 Merge "BDM class and transformation functions" 2013-06-10 19:49:11 +00:00
OpenStack Jenkins 7165d6fcf3 Imported Translations from Transifex
Change-Id: Ifdb8136d1b90f5a2e1d37067fd33f75f2042f81f
2013-06-10 19:38:52 +00:00
Jenkins 08cfd77a36 Merge "Adds check that the core V3 API is loaded" 2013-06-10 18:09:23 +00:00
Jenkins a527229c88 Merge "Regenerate missing resized backing files" 2013-06-10 18:08:59 +00:00
Jenkins a5dede6c4e Merge "Added verbose error message in tests helper mixin" 2013-06-10 18:01:57 +00:00
Jenkins 21c8f0ca4c Merge "Speeding up scheduler tests" 2013-06-10 18:00:24 +00:00
Jenkins 4762f478f2 Merge "More KeypairAPI cleanups" 2013-06-10 17:59:34 +00:00
Jenkins 0cec0a78a5 Merge "Improve Keypair error messages in osapi" 2013-06-10 17:59:11 +00:00
Jenkins e6393e560b Merge "Fix Keypair exception messages" 2013-06-10 17:58:54 +00:00
Jenkins 936f9839a4 Merge "Update analyze_opts to work with new nova.conf sample format" 2013-06-10 17:29:29 +00:00
Yuriy Zveryanskyy 3abd08defd Add missing tests for s3_image_* methods
There was no tests in test_db_api for s3_image_*
methods.

Add tests to ensure that all works.

blueprint db-api-tests

Change-Id: I906025f4c5178b26c222fb28d5c3b220e00ae79c
2013-06-10 17:49:57 +03:00
Jenkins 54e577729d Merge "Export volume metadata to new instances." 2013-06-10 14:48:40 +00:00
Julien Danjou 7bf5c10077 Enhance group handling in extract_opts
When there's 2 options with the same name, the script gets confused and
doesn't know in which group it goes. This fixes it, and fixes also the
template generation which is broken for various reasons:

- gettext.install was missing
- nova-rootwrap when imported calls exit() because it doesn't find a valid
  configuration file, so let's exclude it entirely anyway
- eventlet/greendns needs to be ignored for this

Change-Id: Iaa4e9a806e79032ce1675b46a6b7a7628c3eff89
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-06-10 10:19:00 +02:00
Alexei Kornienko 9ad7274402 Removed code duplication in conductor.api
Used inheritance to avoid logic duplication in conductor.api classes

Fixes: bug #1188577

Change-Id: Id0bedb974354177dc3c6f6562e836924bcaafb08
2013-06-10 11:15:08 +03:00
Alexei Kornienko 77c7846cad Added verbose error message in tests helper mixin
blueprint db-api-tests

Change-Id: I2fcfc50824de8965fe8521cde5f20d24e88eb8ae
2013-06-10 10:48:02 +03:00
Boris Pavlovic 5729051636 Fix db.models.Service description
DB models definition should be up-to-date with DB schema obtained after applying of
migrations. Currently, there are no tests enforcing this and it's really hard to
analyze what indexes should be added, and what indexes we have at the moment.

So the first step is it to fix all models, and add missing descriptions about
Indexes and UniqueConstraints in __table_args__ and use explicit 'nullable'
parameter in columns description.

Add missing 'nullable' parameters to all Columns

Add empty __table_args__ parameter to Table

There is no indexes and no unique constraints in this table at this moment.

blueprint db-sync-models-with-migrations

Change-Id: I9b31e8976f514e370d6b46076b469fe5e5c8e0f1
2013-06-08 19:36:22 +04:00
Nikola Dipanov d581ed04a5 BDM class and transformation functions
This patch adds the utility functions that will help us switch
between versions of block device mapping data.

In order to accomplish this, and to have a more structured approach to
dealing with block device mapping data in the future, this patch
introduces a BlockDeviceDict class which is a thin wrapper around a
standard dict that makes it easier to reason about which fields are
present in the dictionary, and introduces said conversion routines.

blueprint: improve-block-device-handling

Change-Id: I9370333059b8c9aaf92010470b8475a913d329b2
2013-06-08 10:35:32 +02:00
Chris Yeoh 863b3e4540 Cleanup nova exception message conversion
Fix cases where setting the explanation for an HTTP exception
based on a Nova exception was done using str(ANovaException)
rather than using ANovaException.format_message()

Change-Id: Ia8a361fcb088dcf3c17be0d296aee494b9f063d7
2013-06-08 11:00:42 +09:30
Jenkins e0142d0f63 Merge "Call virt.driver.destroy before deallocating network." 2013-06-08 01:17:18 +00:00
Jenkins 08d6c1dd3d Merge "Rename unique constraints due to new convention." 2013-06-07 19:53:03 +00:00
Joe Gordon cd32d6b000 Update analyze_opts to work with new nova.conf sample format
analyze_opts is a tool to help clean out a nova.conf file by checking
for unused and default values set in your nova.conf

Change-Id: I01fff134f8906bff929c55bea8c152653d3e9760
2013-06-07 12:21:21 -07:00
Matthew Macdonald-Wallace e67641da51 Export volume metadata to new instances.
Instances that are booted from volume currently miss out on glance
metadata that instances booted from images receive. By extracting
that data and passing it on in the create request we make it
available to both sorts of instance boot, fixing bug 1175571.

Change-Id: I8c01ba3065a909ca8e1805db9a10a423b10fe289
2013-06-07 17:33:27 +01:00
Victor Sergeyev 64ce647003 Rename unique constraints due to new convention.
We have found that current constraint name convention allows us to create
constraints with duplicate names. It happens if we add constraints
in different tables with the same column names (for example, `name`,
`deleted`). In this case we can not create new constraint in mysql due to
database limitation (it requires constraint name to be unique within a
database). To solve this issue unique constraint name convention has
been changed from "uniq_c1_x_c2_x_c3" to "uniq_t0c10c20c3" where `t` is
a table name and columns `c1`, `c2`, `c3` are in UniqueConstraint.
Fixed unique constraints in models description.
Synced db code from oslo (function `_raise_if_duplicate_entry_error()`
modified respectively to new unique constraint name convention).

blueprint db-enforce-unique-keys
Fixes: bug 1182054

Change-Id: I4122dfb910a07a1a423781ebc22e9ce50596a05d
2013-06-07 18:09:51 +03:00
Thomas Bechtold 3100abbd9d Replace openstack-common with oslo in HACKING.rst
Change-Id: I8c6426983ec374e903c64108b990e5d4550e3fcc
2013-06-07 11:13:51 +02:00
Jenkins 7a475d3cd6 Merge "Allocate networks in the background" 2013-06-07 05:05:18 +00:00
Rick Harris f261afdfbe Speeding up scheduler tests
Database access is costly in tests and many tests
don't actually need it. This patch provides a
simple way we can speed up the Nova tests by
providing a new base class, `NoDBTestCase` which
allows us to white-list tests not needing database
access.

The following speedups were observed:

    With TestCase:     Ran 265 tests in 17.080s
    With NoDBTestCase: Ran 265 tests in  9.478s

Further optimizaton could be done by fixing
`test_host_filters` to not hit the database. This
will require some effort though in order to
maintain the quality of test coverage since part
of what's doing is testing the code in the DB
layer.

Change-Id: Ic34c4c39d7f680ac501efb459fdeaa51331ffe1c
2013-06-07 02:07:41 +00:00