20103 Commits

Author SHA1 Message Date
Zhi Yan Liu
50e30a6b13 Add an extension to show the network id of a virtual interface
This extension adds the OS-EXT-VIF-NET:net_id param
so that users can determine vif plunged into which network now.

DocImpact

Change-Id: I56bef5c45f7f545aa5e9b13760dff1c802da0f8f
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2013-04-08 16:35:26 +08:00
Jenkins
8f2d50381d Merge "Add missing tests for instance_type_extra_specs_* methods" 2013-04-08 05:30:10 +00:00
Jenkins
297e2f74a0 Merge "Remove race condition (in InstanceTypeProjects)" 2013-04-08 05:29:48 +00:00
OpenStack Jenkins
267b4bd51d Imported Translations from Transifex
Change-Id: Ie8f1609f82471ffc0da4594c590aaf763189edf8
2013-04-08 00:02:57 +00:00
Jenkins
147eebe613 Merge "Cannot boot vm if quantum plugin does not support L3 api" 2013-04-07 00:30:55 +00:00
Jenkins
a660e30bb8 Merge "Correct network uuid field for os-network extension " 2013-04-07 00:29:47 +00:00
Stephen Gran
24582abf82 Allow describe_instances to use tags for searches
In the EC2 API, the DescribeInstances API call allows for a 'filter'
argument to be passed, consisting of key/value filter pairs.  If the
filter contains tag:<something> or tag-<something>, the search is done
on resource tags.

See
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html
for details of the API and

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html for
usage.

Change-Id: If2622c4dacbdd3a53fd6d49242225692da8b741a
Signed-off-by: Stephen Gran <stephen.gran@guardian.co.uk>
2013-04-05 20:23:11 +01:00
Jenkins
340015f110 Merge "Only call getLogger after configuring logging." 2013-04-05 18:23:50 +00:00
Zhi Yan Liu
9254403281 Correct network uuid field for os-network extension
"nova net-list" does not return network uuid even when the uuid is
available, and instead returns only the id. This is because the
"network_dict" function in the extension improperly uses "in" to check
for a Network model object. This also reduces compatibility in the API.

Fixes bug: 1162409

Change-Id: I30d4c8bfa37d89123f35ee8cc7c67f0e819262a7
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2013-04-05 22:06:18 +08:00
Davanum Srinivas
6f499a62c3 Only call getLogger after configuring logging.
Logging needs to be setup properly before we try to log
something. Fix a test case that loads the code but does
not execute the code that results in the LOG being setup
properly.

Fixes LP# 1161031

Change-Id: I9d5bc6b87cfb25243f00e17b532d4485dc4454e4
2013-04-05 09:57:48 -04:00
Giampaolo Lauria
42749024b6 Add SecurityGroups API sample tests
Add sample tests for adding and removing security groups
Fixes bug 1157222

Change-Id: Ib8450fcd6334b720a2199d52e07ae00f78aa6df0
2013-04-04 23:05:12 -04:00
Aaron Rosen
c62f698ef1 Cannot boot vm if quantum plugin does not support L3 api
Fixes bug 1163670

Change-Id: I87f0b73e5040b5f9cf7d8c30aa16a2a33faca14f
2013-04-04 15:17:58 -07:00
Boris Pavlovic
5e4f341140 Add missing tests for instance_type_extra_specs_* methods
There was no tests in test_db_api for instance_type_extra_specs_*
methods.

Add tests to ensure that all works.

blueprint db-api-tests

Change-Id: Ie88aa776574c5ddf37a1adcf7cc2c9e70c6eb810
2013-04-05 02:12:33 +04:00
Boris Pavlovic
5248653c7b Remove race condition (in InstanceTypeProjects)
Soft delete all duplicate rows with the same (project_id, instance_type_id)
except one with the biggest value in `id` column.

Create UC on columns (project_id, instance_type_id, deleted)

Add tests for migration

Fix instance_type_access_add method
	Replace Select then Insert -> Try to Insert.

blueprint db-enforce-unique-keys

Change-Id: Id70509337e78f3bf778501f2c77aa03263580ef0
2013-04-05 02:11:33 +04:00
Jenkins
aa81b75528 Merge "Resolve conflicting mac address in resize" 2013-04-04 21:23:25 +00:00
Jenkins
be52197531 Merge "Fix SecurityGroups XML sample tests" 2013-04-04 21:17:36 +00:00
Jenkins
6ad01ac595 Merge "Modify _verify_response to validate response codes." 2013-04-04 21:16:37 +00:00
Jenkins
7a65d7ed74 Merge "Add CRUD methods for tags to the EC2 API." 2013-04-04 20:48:19 +00:00
Jenkins
d6715e843c Merge "Move console scripts to entrypoints." 2013-04-04 20:31:40 +00:00
Jenkins
9c43a6407f Merge "Optimize resource tracker queries for instances" 2013-04-04 18:06:07 +00:00
Brian Elliott
e844946033 Optimize resource tracker queries for instances
instance_get_all_by_host_and_node() had 4 different joins being done.
The resource tracker is the only consumer of this method and does not
need the joins.  This optimization will save many unnecessary rows from
being fetched during the update_available_resource() audit task.

Change-Id: I414c219e4563634e270007fe3d0fa980b273e795
2013-04-04 16:16:12 +00:00
Jenkins
3ddbe0ad3c Merge "Remove deprecated Grizzly code." 2013-04-04 16:05:45 +00:00
Jenkins
f4a062f890 Merge "Fallback to conductor if types are not stashed." 2013-04-04 15:33:27 +00:00
Jenkins
f96c9ab317 Merge "Fix legacy_net_info guard" 2013-04-04 06:50:04 +00:00
Jenkins
a892d2f740 Merge "After migrate, catch and remove deleted instances" 2013-04-04 06:49:13 +00:00
OpenStack Jenkins
34144bd68d Merge "Imported Translations from Transifex" 2013-04-04 06:47:52 +00:00
Jenkins
13534488a2 Merge "Guard against content being None" 2013-04-04 06:44:44 +00:00
Monty Taylor
799a925c1f Move console scripts to entrypoints.
As part of the move of plugins to entrypoints, take advantage of the
entrypoints based console scripts, which will make our command line scripts
available for unittesting.

Part of blueprint entrypoints-plugins

Co-authored-by: Michael Still <mikal@stillhq.com>

Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
2013-04-04 13:14:27 +11:00
Joe Gordon
820f43fc61 Remove deprecated Grizzly code.
Now that Havana development has started remove code deprecated in Grizzly.

Change-Id: Ie3e7611347c334c359dea98d759345b97c66c9c1
2013-04-04 01:10:46 +00:00
Brian Elliott
e9c88b7d36 Fallback to conductor if types are not stashed.
If the instance types are not stashed, fallback to
the conductor API to retrieve them.

bug 1164110

Change-Id: I1f0ef48e072f8580980de5bd8d43cf2206cd7d27
2013-04-04 00:37:30 +00:00
OpenStack Jenkins
b32573ca25 Imported Translations from Transifex
Change-Id: I2abbf4025e7467a090efba9d1f7820a1fcac29d1
2013-04-04 00:03:09 +00:00
Lance Bragstad
2a43c40209 Resolve conflicting mac address in resize
This patch fixes bug 1161226 and mac address conflicts when migrating or
resizing an instance using the PowerVM driver. This will ensure that if
a migration or resize is taking place on the same host, a temporary mac
address will be assigned to the original LPAR so there is no conflict on
the VIOS when a second LPAR is started with the same address.

Change-Id: I59db484defb789f3a7c0eddbd5ef9e92efc22419
2013-04-03 23:16:50 +00:00
Robert Collins
a01f907cec Simplify and correct the bm partition sizes.
The sfdisk code that landed uses -D, which ends up subtracting space
from the first partition - this plays havoc with precisely sized disk
images due to a bug in the automatic adjustment code. Instead we
directly specify the spare space to be allowed.

Additionally, sfdisk can be used much more simply, avoiding any room
for us to make arithmetic errors, and reducing the opportunity for
race conditions with udev so this change does that.

Change-Id: I7f95e867d8775f49698cbbf4b1be40e69db9d538
2013-04-04 10:21:06 +13:00
Rick Harris
948d1fefe6 Fix legacy_net_info guard
The existing code assumes that `legacy_net_info` is always in legacy
mode, meaning a list of tuples which causes it to break when passed a
new-style NetworkInfo object.

Fixes bug 1164152

Change-Id: I2131d9b24045cd7531454b65d97776b11ec3ab02
2013-04-03 21:19:32 +00:00
Giampaolo Lauria
4e9a8ec66a Fix SecurityGroups XML sample tests
Fixes bug 1157521

Change-Id: I38ad52e0720feea37e8dbda8ad9c29162842c8f1
2013-04-03 19:41:25 +00:00
Giampaolo Lauria
751b21de31 Modify _verify_response to validate response codes.
The method will now take a response code as an additional
parameter and will validate it against the actual one.
Fixes bug 1156684

Change-Id: Idba3f54ed50b359d9230707fb45e7c5ea68e6b7d
2013-04-03 15:15:49 -04:00
Jenkins
f3d6e5ccda Merge "Fix a typo in attach_interface error path" 2013-04-03 19:04:11 +00:00
Jenkins
5325836f2c Merge "Grab instance for migration before updating usage" 2013-04-03 18:00:05 +00:00
Dan Smith
0ce92fcb23 Fix a typo in attach_interface error path
This prevents an attach failure from raising the proper exception to
the caller.

Change-Id: I51559cf395fc99738127b7a443437197d15f3d4c
2013-04-03 09:52:20 -07:00
Stanislaw Pitucha
306046c7d5 After migrate, catch and remove deleted instances
On the host init, starting with a deleted instance which has been
previously evacuated from the host results in an InstanceNotFound
exception. Catch and log this, and then call driver.destroy() so
that the hypervisor driver can clean up the deleted instance.

If we don't do this during host init, it will cause problems during
periodic tasks.

Fixes bug 1155152

Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>

Change-Id: I979a698b8e739b9335f37b81e789285f91977a8e
2013-04-03 07:32:44 -07:00
Jenkins
1ad8d1a749 Merge "Explain why the give methods are whitelisted." 2013-04-03 14:05:02 +00:00
Jenkins
22dd8b1847 Merge "Update latest oslo.setup." 2013-04-03 14:02:59 +00:00
Jenkins
f7add7ea8c Merge "Limit the checks for block device becoming available." 2013-04-03 14:01:17 +00:00
Jenkins
1d5b10ea76 Merge "Fix _error_out_instance exception handler" 2013-04-03 02:11:07 +00:00
Andrew Laski
a574af21f8 Grab instance for migration before updating usage
Updates _update_usage_from_migrations so that it grabs the instance
associated with a migration before updating usage.

Bug 1163622

Change-Id: I64acef912ae71ea5c7fb66e9fcaafe5750c63eaf
2013-04-02 20:47:04 -04:00
Joshua Harlow
e9e8b5314e Explain why the give methods are whitelisted.
In order to aid mine (and likely others) understanding of this
code it seems to make sense to document what these special whitelisted
attributes are.

Change-Id: I1c11484fc74e898df5d25ab94ed0cdb288accd67
2013-04-02 17:10:43 -07:00
Rick Harris
782bab8dd2 Guard against content being None
`content` can be passed in as None, so we need to set it to the empty
list if that occurs.

This also fixes the bad-practice of using a mutable data-type as a
default argument.

Fixes bug 1163598

Change-Id: Ie991c9452a21cfb036d3955a094ec345805d63d1
2013-04-02 21:54:12 +00:00
Joshua Harlow
24aacd2c91 Limit the checks for block device becoming available.
Instead of previously looping potentially forever for a block
device mapping to become created from the volume api, basically
blocking a greenthread until this happens we now will have a number
of attempts (defaulting to 10) that we will wait for the volume api
to create said block device mapping (or error out).

Fixes bug 1162064

Change-Id: I6ff0b42aad48df735d09f91a0a9fe98e6abcf2eb
2013-04-02 13:03:00 -07:00
Rick Harris
25afdbbda8 Fix _error_out_instance exception handler
Since Eventlet clears exceptions between greenthread switching, we need
to save that exception so it can be re-raised.

The _error_out_instance event handler did not wrap the quotas call with
the save_and_reraise_exception, so the original exception was lost.

Fixes bug 1163552

Change-Id: I69d28917aae1d787351cd800f8996532e5485eb2
2013-04-02 19:51:39 +00:00
Jenkins
4810b5ad93 Merge "Raise rather than generating millions of IPs." 2013-04-02 19:42:48 +00:00