Commit Graph

45662 Commits

Author SHA1 Message Date
Jenkins cd2d6f592b Merge "placement: Add Trait and TraitList objects" 2017-03-24 19:59:58 +00:00
Jenkins aa95d71c83 Merge "Remove legacy regeneration of RequestSpec in MigrationTask" 2017-03-24 19:49:48 +00:00
Jenkins 633614606f Merge "Add description to policies in consoles.py" 2017-03-24 18:36:54 +00:00
Jenkins 8baa44a616 Merge "Add description to policies in create_backup.py" 2017-03-24 18:35:48 +00:00
Jenkins f05c0c2fe7 Merge "Add description to policies in deferred_delete.py" 2017-03-24 18:27:10 +00:00
Jenkins 6f4b3abcf5 Merge "Add description to policies to availability_zone" 2017-03-24 16:10:25 +00:00
He Jie Xu b5bb07c51e placement: Add Trait and TraitList objects
Two objects Trait and TraitList are added for operating single or
a list of traits.

The 'get_all' method of TraitList supports two filters 'name_in'
and 'prefix'. Those two filters are for implement the trait REST
API "/traits?name=in:TRAIT_A,TRAIT_B" and
"/traits?name=startswith:CUSTOM".

Part of implementation blueprint resource-provider-traits

Change-Id: I61d3fea4f8580affd482d424a1e39096354c8ec8
2017-03-24 16:01:08 +00:00
Jenkins cec2802155 Merge "'uplug' word spelling mistake" 2017-03-24 15:26:53 +00:00
Dan Smith 8c3aa8df24 Remove legacy regeneration of RequestSpec in MigrationTask
Previously we regenerated the RequestSpec from details in the Instance
before we had the full original object available to us. That is no
longer necessary and means we will not honor some of the original
request. Remove that now.

Change-Id: I195d389ac59574724a5e7202ba1a17d92c53a676
Closes-Bug: #1675607
2017-03-24 07:54:12 -07:00
Jenkins 0191fedcd0 Merge "Add description to policies in suspend_server.py" 2017-03-24 11:09:00 +00:00
Zhou Jianming fd786bd509 'uplug' word spelling mistake
Change-Id: Ibbe0143a2f3ad64eee377b5dc38d0b4c5f128f83
Fixes: Bug 1675712
2017-03-24 17:50:47 +08:00
Jenkins 6f881e8b84 Merge "Revert "libvirt: Pass instance to connect_volume and ..."" 2017-03-24 04:58:07 +00:00
Matt Riedemann de7c0594d1 Revert "libvirt: Pass instance to connect_volume and ..."
This reverts commit f0153fa4c8.

This broke a whole set of FS-based volume drivers since it
didn't change the method signatures in those drivers to take
the new instance argument.

I was working on adding them but then just decided this
isn't even used right now so it's faster to revert.

When this is added back in, I want to see the
LibvirtBaseVolumeDriver class turned into an ABC and
the connect_volume and disconnect_volume methods turned
into abstractmethods in LibvirtBaseVolumeDriver so this
kind of thing does not happen again.

Change-Id: If1ee6d6e4004750f80424ec54d7dabc564ec9e06
Closes-Bug: #1675584
2017-03-23 23:33:45 +00:00
Anusha Unnam 59da6bc990 Add description to policies to availability_zone
The 'discoverable' policy is not documented as it will be removed
in a future change.

blueprint policy-docs

Change-Id: I25eb7b34490f7a113bcaf6e95ee65986943e418d
2017-03-23 21:49:17 +00:00
Jenkins 2a41eb8786 Merge "Get instance availability_zone without hitting the api db" 2017-03-23 21:22:46 +00:00
Jenkins 452bc2a4f3 Merge "Set instance.availability_zone whenever we schedule" 2017-03-23 21:21:56 +00:00
Jenkins 1c370b9b35 Merge "Add resize server functional negative tests" 2017-03-23 21:20:06 +00:00
Anusha Unnam 5a8011f4f3 Add description to policies in suspend_server.py
The 'discoverable' policy is not documented as it will be removed in a
future change.

blueprint policy-docs

Change-Id: Ie31ee38c6f36fae21c8b8b88ef6722f4a6e5aa6b
2017-03-23 20:44:14 +00:00
Jenkins ed9c6d9a9b Merge "objects: Add attachment_id to BlockDeviceMapping" 2017-03-23 20:04:41 +00:00
Jenkins 1e080932d0 Merge "db: Add attachment_id to block_device_mapping" 2017-03-23 20:03:57 +00:00
Jenkins 3c59e93d74 Merge "[placement] Don't use floats in microversion handling" 2017-03-23 17:11:13 +00:00
Dan Smith 9f7bac2845 Get instance availability_zone without hitting the api db
This would be an upcall from the cell to the api db, which we don't
want. We store the availability_zone on the instance now, and even
use it for pre-scheduled instances, so just use that instead of
the extra lookup.

Related to blueprint cells-aware-api

Change-Id: I73c3b10e52ab4cfda9dacc0c0ba92d1fcb60bcc9
2017-03-23 09:30:43 -07:00
Dan Smith 03b4c67b22 Set instance.availability_zone whenever we schedule
This ensures that instance.availability_zone reflects what AZ the
instance is actually in. In the case where no AZ was requested at
boot, previously this would always be some default value, which
isn't as useful to the things that need to consider what AZ the
instance is actually in (without doing all the aggregate math to
determine it on the fly).

Related to blueprint cells-aware-api
Change-Id: I8d426f2635232ffc4b510548a905794ca88d7f99
2017-03-23 09:30:40 -07:00
Chris Dent b2b366aa4a [placement] Don't use floats in microversion handling
When microversioned request handling was added to placement some
comparisons were added that treat the microversions as floats. This
will break as soon as the right hand side of the version chnages
from one digit to two. A float of 1.1 and 1.10 is the same. A
version string of '1.1' and '1.10' is not.

This patch changes the internals of version handling to always use
Version objects which represent the versions using a name tuple
(major=1, minor=10). It also changes the externals to expect versions
as strings ('1.10'). Where floats were present before, these have
been changed to strings. Where tuples have been accepted, these are
still accepted, but strings are as well.

This is an internal only change, users shouldn't notice any
difference as their versions (in the openstack-api-version header)
were always strings and we haven't made it to version 1.10, sorry
'1.10', yet.

If developers try to version_handler with something other than a
version string, test runs will fail very early (at import time).

Change-Id: Ic2b655ac4c75c6104eddecd174f193413a0764d2
Closes-Bug: #1675143
2017-03-23 13:21:21 +00:00
Jenkins b9d4bc94ab Merge "libvirt: Pass instance to connect_volume and disconnect_volume" 2017-03-23 12:40:39 +00:00
Jenkins ecac4d2337 Merge "Add lan9118 as valid nic for hw_vif_model property for qemu" 2017-03-23 12:37:09 +00:00
Jenkins ab44e75fb3 Merge "Add description to policies in cells.py" 2017-03-23 03:55:46 +00:00
Jenkins 9db0fe2a8e Merge "Avoid lazy-loading projects during flavor notification" 2017-03-22 22:50:43 +00:00
Thomas Stewart af8d93fa9d Add lan9118 as valid nic for hw_vif_model property for qemu
DocImpact
This introduces an additional VNI so the hw_vif_model doc needs updating
to reflect this at:
https://docs.openstack.org/cli-reference/glance-property-keys.html

Change-Id: Ifc1636bff53cf74f889e1f4b632fa62c52d07b8e
Closes-Bug: 1638059
Signed-off-by: Thomas Stewart <thomas@stewarts.org.uk>
2017-03-22 17:06:29 +00:00
Sujitha 68ab7a1b8c Add description to policies in deferred_delete.py
Change-Id: I4b6d3d9ee760441cf8732837dbc1730a57262e27
blueprint: policy-docs
2017-03-22 16:55:46 +00:00
Sujitha 620d3825d2 Add description to policies in create_backup.py
Change-Id: I9e3db039b33e557a5ed7114ef2fa7dc13beb1481
blueprint: policy-docs
2017-03-22 16:45:55 +00:00
Sujitha 8264ed138e Add description to policies in consoles.py
Change-Id: I56aadc6277007d353b28849cee91a1c6670259fa
blueprint: policy-docs
2017-03-22 16:40:50 +00:00
Jenkins 3ee4b0cf0e Merge "conf: Deprecate 'use_ipv6'" 2017-03-22 14:54:04 +00:00
Jenkins a4ee3ea563 Merge "netutils: Ignore 'use_ipv6' for network templates" 2017-03-22 14:53:29 +00:00
Jenkins df6fa11185 Merge "Handle conflicts for os-assisted-volume-snapshots" 2017-03-22 14:30:55 +00:00
Stephen Finucane 0b550db05f conf: Deprecate 'use_ipv6'
Since Idcfdaf3b removed the use of this flag in the libvirt port filter
and I188fc2c removed the use in injected network templates, the only
remaining use of this option is in nova-network. As a result, we can
deprecate this like nova-network itself.

Change-Id: Ibbcd1fd11c3563b4ddef7c128b714402beac7e3d
Implements: blueprint centralize-config-options-pike
2017-03-22 12:03:06 +00:00
Stephen Finucane c0aef97c49 netutils: Ignore 'use_ipv6' for network templates
Nova supports file injection of network templates. Putting these in a
config drive is the only way to configure networking without DHCP.

At present, setting the 'use_ipv6' config option to False prevents the
generation of IPv6 network info, even if there are IPv6 networks
available. This was fine when using nova-network, where the same config
option is used to control generation of these subnets. However, a
mismatch between this nova option and equivalent IPv6 options in neutron
would result in IPv6 packets being dropped.

Seeing as there is apparent reason for not including IPv6 network info
when IPv6 capable networks are present, we can ignore this option.
Instead, we include info for all available networks in the template, be
they IPv4 or IPv6.

Change-Id: I188fc2cd1b26fe7a71804f7e7d66b111d6f15e30
Implements: blueprint centralize-config-options-pike
2017-03-22 12:02:30 +00:00
Jenkins 39cd540917 Merge "Remove the EC2 compatible API tags filter related codes" 2017-03-22 09:25:25 +00:00
Jenkins 779562eaa3 Merge "Add check for invalid inventory amounts" 2017-03-22 02:52:35 +00:00
Jenkins 3f3eb9070a Merge "Add check for invalid allocation amounts" 2017-03-22 02:51:59 +00:00
Jenkins c183e796e2 Merge "Remove the Allocation.create() method." 2017-03-22 02:46:37 +00:00
Jenkins 95d48361ff Merge "libvirt: conditionally set script path for ethernet vif types" 2017-03-22 01:05:42 +00:00
Jenkins 5c0cb33d75 Merge "libvirt: Ignore 'use_ipv6' for port filters" 2017-03-22 00:09:13 +00:00
Jenkins a0279171d3 Merge "conf: Fix indentation in conf/netconf" 2017-03-21 23:52:55 +00:00
EdLeafe 0b2d7c4d02 Add check for invalid inventory amounts
This patch adds sane minimum and maximums to the fields for an inventory
posting, which will quickly return a 400 error if invalid values are
passed instead of proceeding, only to fail at the DB layer.

Partial-Bug: #1673227

Change-Id: I6296cee6b8a4be1dd53c52f6290ebda926cf6465
2017-03-21 16:45:36 -07:00
EdLeafe 6a6d021f81 Add check for invalid allocation amounts
This patch adds a check for the amounts in allocations passed to the
placement API, and returns an error if any amount is not greater than
zero.

Partial-Bug: #1673227

Change-Id: I2a8dc038d6489e82ad51fdc27d22cf0ab2d66322
2017-03-21 16:45:36 -07:00
EdLeafe d5999d1f48 Remove the Allocation.create() method.
This method is no longer used, nor should it be. Instead, the
AllocationList.create_all() method should be used to create allocations
in the DB. Tests have been updated to use create_all() instead, and as
create_all() enforces inventory/allocation relationships, several tests
had to be modified so that they properly accounted for this.

Change-Id: I0bccfee155c871babf507cdd1117b5023d5a1361
2017-03-21 16:45:34 -07:00
Jenkins 08f1f20559 Merge "Ironic: hardcode min_unit for standard resources to 1" 2017-03-21 23:44:19 +00:00
Jenkins 0f1fba8ce9 Merge "Add release note for CVE-2017-7214" 2017-03-21 23:28:11 +00:00
Matt Riedemann 3f985f1eda Add release note for CVE-2017-7214
Change-Id: I1f5b772bff8fa2dc508c4bdd3dd1f32838594786
Related-Bug: #1673569
2017-03-21 17:54:43 -04:00