36616 Commits

Author SHA1 Message Date
Matt Riedemann
9369aab04e Don't expect meta attributes in object_compat that aren't in the db obj
The object_compat decorator expects to get the Instance object with
'metadata' and 'system_metadata' attributes but if those aren't in the
db instance dict object, Instance._from_db_object will fail with a
KeyError.

In Kilo this happens per refresh_instance_security_rules because in the
compute API code, the instance passed to refresh_instance_security_rules
comes from the call to get the security group(s) which joins on the
instances column, but that doesn't join on the metadata/system_metadata
fields for the instances.  So when the instances get to object_compat in
the compute manager and the db instance dict is converted to the
Instance object, it expects fields that aren't in the dict and we get
the KeyError.

The refresh_instance_security_rules case is fixed in Liberty per commit
12fbe6f082ef9b70b89302e15daa12e851e507a7 - in that case the compute API
passes Instance objects to the compute manager so object_compat doesn't
have anything to do, _load_instance just sees instance_or_dict isn't a
dict and ignores it.

We're making this change since (1) it's an obviously wrong assumption in
object_compat and should be fixed and (2) we need to backport this fix
to stable/kilo since it's an upgrade impact for users there.

Closes-Bug: #1484738

Change-Id: I36a954c095a9aa35879200784dc18e35edf689e6
2015-09-09 20:29:09 -07:00
Jenkins
279c2b0a01 Merge "Fix debug log format in object_backport_versions()" 2015-09-09 21:34:35 +00:00
Jenkins
40dbe07b14 Merge "api: allow any scheduler hints" 2015-09-09 21:05:52 +00:00
Dan Smith
e36e9b9b05 Fix debug log format in object_backport_versions()
This fixes an obvious log formatting issue in this method.

Change-Id: I63dfb27d6caa2813a861c75616b5fef75ae7b67e
Closes-Bug: #1493961
2015-09-09 11:56:50 -07:00
Jenkins
915e0d18b9 Merge "Add os-brick's scsi_id command to rootwrap" 2015-09-09 17:00:52 +00:00
Jenkins
e68db1157a Merge "Ironic: Call unprovison for nodes in DEPLOYING state" 2015-09-09 14:56:29 +00:00
Jenkins
8d85c3f8c4 Merge "Add some explanation for the instance AZ field" 2015-09-09 13:30:10 +00:00
Lucas Alvares Gomes
bfe52542f5 Ironic: Call unprovison for nodes in DEPLOYING state
This patch is making the Nova ironic driver to try to unprovision the node
even if it's in DEPLOYING state. Current Ironic will not accept aborting
the deployment when it's in DEPLOYING state but with the retry mechanism
it may work once the state is moved to ACTIVE or DEPLOYWAIT. Prior to
this patch the logic was to not even try to unprovision the node if it's
in DEPLOYING and just go ahead and clean the instance but that behavior
is dangerous and could leave orphan active instances in Ironic. With
this patch at least if the unprovision fails in Ironic we can make sure
that the instance won't be deleted from Nova.

The tests for the destroy() method were refactored to extend testing
destroy() being called with all provision state methods in Ironic
instead of picking certain ones; A helper function was created to avoid
code duplication on the tests.

Partial-Bug: #1477490
Change-Id: I227eac73a9043dc242b7a0908bc27b628b830c3c
2015-09-09 10:38:22 +01:00
John Garbutt
4a29486f4c api: allow any scheduler hints
To help with v2.1 compat mode, we need to allow users to pass in any
scheduler hints, to allow for out of tree extensions.

This includes ensuring the soft additional properties validator does not
strip out extra properties when they are allowed by the schema.

As this Mail:
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067996.html
pointed out the limit the scheduler-hints in the API is problematic. This
patch relax the validation of scheduler hints for v2.1 also.

Co-Authored-By: Ed Leafe <ed@leafe.com>
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Change-Id: I4c066075165f69d355a74979808fa0ad8d6546ab
2015-09-09 10:21:09 +08:00
Jenkins
1db33ca6c2 Merge "Remove and deprecate conductor compute_node_create()" 2015-09-08 22:17:06 +00:00
Jenkins
27b32bffbe Merge "Drop unused conductor manager vol_usage_update() mock" 2015-09-08 22:13:51 +00:00
Jenkins
cccc0f2003 Merge "Remove unused parameter overwrite in elevated" 2015-09-08 22:13:04 +00:00
Jenkins
c510c83417 Merge "Fix order of arguments in assertEqual" 2015-09-08 22:09:04 +00:00
Jenkins
ae30acaf7a Merge "Updated from global requirements" 2015-09-08 20:42:45 +00:00
Jenkins
af0ca275bb Merge "nova-net: fix missing log variable in deallocate_fixed_ip" 2015-09-08 20:41:45 +00:00
Jenkins
15d1d3f990 Merge "New sensible network bandwidth quota values in Nova tests" 2015-09-08 20:31:27 +00:00
Jenkins
f560f3bcdc Merge "libvirt: Fix snapshot delete for network disk type for blockRebase op" 2015-09-08 20:30:35 +00:00
Jenkins
cd65b5fd55 Merge "libvirt: cleanup() serial_consoles after instance failure" 2015-09-08 20:15:27 +00:00
Jenkins
4f20438a89 Merge "ironic: convert driver to use nova.objects.ImageMeta" 2015-09-08 17:42:47 +00:00
Jenkins
59cb5651e2 Merge "objects: convert config drive to use ImageMeta object" 2015-09-08 17:35:26 +00:00
OpenStack Proposal Bot
c44f8ca5ab Updated from global requirements
Change-Id: Iedae83b1c4d6e53fc1f80fe30ed47766f83e64d5
2015-09-08 16:30:02 +00:00
Sylvain Bauza
408208f810 Add some explanation for the instance AZ field
Since it's pretty confusing to understand why an instance AZ can be different
from the host AZ the instance belongs to, and since that field is never
updated even after an instance is scheduled to an host, we think it's good
to add a comment in the DB model to explain that.

Change-Id: Id0914530cbacf4cf5c3319f1401bf07b3112935d
2015-09-08 16:16:05 +02:00
Jenkins
78b1728a4b Merge "Relax restrictions on server name" 2015-09-08 14:00:42 +00:00
Jenkins
4eb2e087b9 Merge "Imported Translations from Transifex" 2015-09-08 13:24:16 +00:00
Dan Smith
652e84a1b9 Freeze v1 Instance and InstanceList schema hashes
This adds two comments to help remind us that Instance and InstanceList
v1 objects should not change anymore.

Related to blueprint liberty-bump-object-and-rpcapi-versions

Change-Id: Id05b35444a971d1531b43895533d6a6bf406c702
2015-09-08 08:14:10 +00:00
OpenStack Proposal Bot
5ad27b220d Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I434874a91f712229c74345b66cbbb1a048184ec2
2015-09-08 06:25:03 +00:00
ChangBo Guo(gcb)
888abec725 Remove unused parameter overwrite in elevated
Nova uses overwrite in constructor of RequestContext to
update thread's local context or not, we don't need it
in method elevated, due to we never replace thread's local
context when get a copy with current context.

Change-Id: Ia85dfc4ddf4d4d31a7367c1ff90da118f503ba09
2015-09-08 05:22:35 +00:00
liyingjun
09a55e2bf4 Add missing delete policies in the sample file
Policy check for delete related actions are supported,
but missing in the sample file, it would be nice to add these.

Change-Id: I8d58be7f3cb1bdefc3b783a256c21ed216cdbad7
Closes-bug: #1446032
2015-09-08 11:59:34 +08:00
Jenkins
d91fb80e51 Merge "Remove old unused baremetal rootwrap filters" 2015-09-07 22:48:47 +00:00
Daniel P. Berrange
5a82d650bd ironic: convert driver to use nova.objects.ImageMeta
Convert the ironic driver and related files to make use of
the nova.objects.ImageMeta object. Where an image_meta
dict is passed in via the virt API, it is converted to
object form before being used.

Change-Id: Icc1c6ab43fd6ac61a979c6c6676c1960c9cd0639
2015-09-07 17:11:02 +01:00
Daniel P. Berrange
3eea2a4492 objects: convert config drive to use ImageMeta object
The config drive code checks for a property 'img_config_drive'
in the instance system metadata. Add this property to the
ImageMetaProps object and convert the config drive code to
use the ImageMeta object for accessing it.

Change-Id: Id96af7e6f8429c58a8224c3d32c982a3af7d9cd7
2015-09-07 17:11:02 +01:00
Jenkins
ae55af90d6 Merge "Add functional test for server group" 2015-09-07 13:03:01 +00:00
Jenkins
c05d735f6f Merge "Add constraint target to tox.ini" 2015-09-07 12:58:57 +00:00
Jenkins
8cf2228ea1 Merge "Cells: remove redundant check if cells are enabled" 2015-09-07 11:56:18 +00:00
Jenkins
a897bb9ed0 Merge "API: remove unused parameter" 2015-09-07 11:55:47 +00:00
Jenkins
bffdec0f0f Merge "Fix DeprecationWarning when using BaseException.message" 2015-09-07 02:15:15 +00:00
Jenkins
e53667c29d Merge "Fix incomplete error message of quota exceeded" 2015-09-06 22:07:30 +00:00
Matt Riedemann
266391c77f Remove old unused baremetal rootwrap filters
These two filters don't show up in the nova code anymore, probably
removed when baremetal was replaced with ironic.

Change-Id: Ia1e1bbe21bf9d8956775b7dff593dd9cbd046367
2015-09-06 06:28:44 -07:00
Jenkins
f1f799183f Merge "Remove the blacklisted nova-cells shelve tests" 2015-09-06 11:58:28 +00:00
Sean Dague
a0aeaa0e5b Relax restrictions on server name
The server name is designed to be anything the user would like it to
be, so should be validated against name, not hostname. This is how
v2.0 worked, and v2.1 schema validation accidentally went over the top
here. v2.1 regressed at  f40b6a1d5c91628f78fdbc0417a3a394a69ab716

Change-Id: Ia32a452ab3a5d7cd5a5289e8e8bf9f8e5e404780
Partial-Bug: #1491511
2015-09-06 15:16:59 +08:00
Jenkins
0391a19d0f Merge "Reject the cell name include '!', '.' and '@' for Nova API" 2015-09-06 03:19:28 +00:00
Sean McGinnis
80b3b9ffb0 Add os-brick's scsi_id command to rootwrap
Fibre channel drivers are failing on calls from the
os-brick library to scsi_id.

This is a temporary fix until os-brick's rootwrap
filters can be pulled in. It is not intended or
desired that nova track all os-brick rootwrap filter
values. But until that mechanism is finalized, we
need necessary commands added here.

Change-Id: Ie5f1fbe0a2da171d80faefe3245df91aef8ce1ab
Partial-bug: #1479842
2015-09-05 14:25:48 -05:00
Hans Lindgren
32c56137b4 Remove and deprecate conductor compute_node_create()
Now that the one and only call to create a compute node record in
resource tracker has been converted to objects[1], the old method
in conductor can be cleaned out.

[1] commit 2ef014eb313396cffb73fc52f5cea6b5a2151da7

Related to blueprint liberty-bump-object-and-rpcapi-versions

Change-Id: I6f8043efcc5928d7e42bc32b638bbd4e782a1e2a
2015-09-05 10:11:06 +02:00
Hans Lindgren
2a461f4160 Drop unused conductor manager vol_usage_update() mock
A recent change replaced calls to conductor method vol_usage_update()
with objects calls. One mock was mistakenly left in place and must be
removed before the method itself can be dropped in an upcoming
conductor rpc major version bump.

Change-Id: I2881189c904110a9f8aa85af266916d243de7586
2015-09-05 10:09:23 +02:00
Jenkins
ce2da347a9 Merge "Add notes explaining vmware's suds usage" 2015-09-05 07:14:44 +00:00
Jenkins
69bcfc3d3e Merge "Add Instance and InstanceList v2.0 objects" 2015-09-05 01:53:39 +00:00
Jenkins
a5ff51d8bf Merge "Teach conductor to do manifest-based object_class_action() things" 2015-09-05 01:53:11 +00:00
Jenkins
b893d2114b Merge "Make the conductor fixture use version manifests" 2015-09-05 01:35:12 +00:00
Jenkins
3b333cb2ae Merge "Update objects test infrastructure for multiple versions" 2015-09-05 01:34:44 +00:00
Jenkins
72c1195af8 Merge "Refactor Instance tests to use objects.Instance" 2015-09-05 01:34:17 +00:00