Commit Graph

2238 Commits

Author SHA1 Message Date
Jenkins aac977ebd3 Merge "Move rebuild notification tests into separate method" 2017-06-08 21:19:41 +00:00
Jenkins 5a157a229a Merge "Add PCIWeigher" 2017-06-08 20:44:17 +00:00
Stephen Finucane ec74cc688e Add PCIWeigher
Take three hosts, one with a single PCI device, one with many PCI
devices, and one with no PCI devices. Nova should prioritise these
differently based on the demands of the instance. If the instance
requests a single PCI device, then the first of the hosts should be
preferred. Similarly, if the instance requests multiple PCI devices,
then the second of these hosts would be preferred. Finally, if the
instance does not request a PCI device, then the last of these hosts
should be preferred.

While the first and second of these cases is already somewhat handled by
the NUMA topology filter (which will ensure the correct number and type
of PCI devices are available on the hosts), there is nothing to stop a
instance that *does not* require PCI devices from occupying space on one
of the few hosts that *does* have free PCI devices.

The PCIWeigher is designed to keep hosts with PCI device(s) as free as
possible, to best ensure they can satisfy requests from instances with
PCI requirements when called upon.  This change ensures (a) an instance
with PCI requirements has the best possible chance of scheduling
successfully and (b) an instance without these requirements won't clog
up hosts that have these valuable resources.

Change-Id: I04bf7e6b8324dcac6c93b0cb69c38c30fb05be56
Partially Implements: blueprint reserve-numa-with-pci
2017-06-08 09:44:46 +01:00
Vu Cong Tuan 0808398487 Fix html_last_updated_fmt for Python3
html_last_updated_fmt option is interpreted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.

Changing Popen to .check_output because of 3 reasons:
1. check_output() will raise CalledProcessError if
the called process returns a non-zero return code.
2. For consistency with keystone [1] and cinder [2]
3. It makes the code look much better.

[1] https://review.openstack.org/#/c/457142/
[2] https://review.openstack.org/#/c/433081

Change-Id: Ia3e792c512da46c2b92d3ad9ec1657849d379052
2017-06-07 21:05:12 +00:00
Gábor Antal 85d20dfa48 Move rebuild notification tests into separate method
The current rebuild testing in test_instance_action changes the image
used by the instance, therefore the actions tested in
test_instance_action had to be in specific order as testing rebuild
also changes the output json.

The rebuild test was moved from test_instance_action to its own method,
and now all the actions in test_instance_actions keeps the instance in
the same state.

Change-Id: Id0a7aaf8575d69deb89d3842b54fc23ee05b2153
Implements: bp versioned-notification-transformation-pike
2017-06-07 17:35:51 +02:00
Kevin_Zheng 1590f18c63 Send out notifications when instance tags changed
This patch adds notifications when instance
tags changed, as tag is commonly used for
searching and filtering, and projects like
searchlight depends on the notifications.

To avoid unnecessarily building a notification
payload when notifications are disabled, this
change also adds the if_notifications_enabled
decorator to send_instance_update_notification.

Change-Id: I03c8e8225e51fd80580772752c0b292987e34218
Implements: bp send-tag-notification
2017-06-06 12:53:28 -04:00
Sergey Nikitin a944838993 Standardization of VM diagnostics info API.
Before this patch, VM diagnostics response was just a
'blob' of data returned by each hypervisor. New API
version makes diagnostics response standardized.
New response has a set of fields which each hypervisor
will try to fill. If hypervisor unable to provide a
specific field then this field will be reported as 'None'.

Tempest tests: I7757c5beeea3d3b0bc15a51cafc5ea2ada65e76c

DocImpact: admin guide docs should be updated to mention
standardized version of the diagnostics response

blueprint: restore-vm-diagnostics

Change-Id: If0b1493cc5c1c7f0d9896dd68342ad4dea4f7da2
2017-06-05 07:45:51 +00:00
Jenkins 28ace935cd Merge "Don't lazy-load flavor.projects during destroy()" 2017-06-03 01:10:58 +00:00
Chris Friesen 90636e0f33 show flavor info in server details
Add a new microversion to change the flavor field in the server
details to display a subset of the flavor information instead of
just a link to the original flavor.

This is more reliable since it shows the actual instance size, while
the flavor may have been deleted/recreated in the meantime or the
flavor extra-specs may have been modified.

Implements: blueprint instance-flavor-api
Change-Id: If646149efb7eec8c90bf7d07c39ff4c495349941
2017-06-02 12:09:24 -04:00
Chris Friesen 31d2e465e3 add new test fixture flavor with extra_specs
We support flavor extra_specs, so it would probably make sense to
have some in one of the test fixture flavors.

In order to make it compatible with the functional tests we'll make
it as small as m1.tiny.
Change-Id: Ic98d7dd2f44796279e18083a8c423aed0066d177
2017-06-01 22:43:13 -06:00
Jenkins 8d38fe308a Merge "Replace diagnostics objects with Nova diagnostics objects" 2017-05-31 11:11:40 +00:00
Kevin_Zheng 78486ac3e1 Fix doc job with correct ref link
block_device_mapping.rst had bad ref link and i think with
oslosphinx 4.13 or Sphinx 1.6.2, it started throwing error.

This commit fix this.

Change-Id: Ia279fd93609664efcdb5038a50460d54dd14f254
2017-05-31 07:53:15 +00:00
Sergey Nikitin a6335343cf Replace diagnostics objects with Nova diagnostics objects
New objects are children of NovaObject class. Such parent
will give us a good control of objects versioning. Also it
will force contributors to dump objects version in case of
any changes. These objects will be used to transmit data
via RPC. Old objects were used only for storing data.
During RPC transmission they are transform into dictionaries.
It is not right approach because we will have some problems
in case of adding new diagnostics fields.

Version of compute RPC was bumped.

Also some changes were made in libvirt driver method
get_instance_diagnostics(). These changes were made to fill
new fields of 'Diagnostics' object.

Implementation of method get_instance_diagnostics()
for other virt drivers will be changed in future patches.

blueprint: restore-vm-diagnostics

Change-Id: I5e2d116df045f803c654f7810b939b5fc859cfbf
2017-05-30 00:39:45 +04:00
Jenkins d25185b199 Merge "Deprecate TypeAffinityFilter" 2017-05-29 19:20:38 +00:00
Matt Riedemann 46ba7e8df5 Deprecate TypeAffinityFilter
This deprecates the TypeAffinityFilter. This filter, which
is really an anti-affinity filter for flavors, attempts to
ensure that no two flavors show up on the same host. However,
to do this it relies on the flavors.id primary key, which is
subject to "change" if/when the admin deletes and recreates a
flavor (this is how Horizon allows you to 'edit' a flavor).
When you do that, you have a new flavor with a new id primary
key and the filter will not know the difference. So you could
really end up with more than one m1.large instance on the
same host, which defeats the purpose of the filter.

This filter is also problematic for
blueprint put-host-manager-instance-info-on-a-diet because in
that blueprint we want to stop sending full instance objects
over RPC from all compute services to the scheduler just to
track affinity and anti-affinity. All we really need for the
ServerGroupAffinityFilter and ServerGroupAntiAffinityFilter
is the list of instance uuids on a host, not the full object.
If we can get rid of TypeAffinityFilter, we can change the
compute<>scheduler RPC calls to just pass the list of instance
uuids for update_instance_info rather than sending an InstanceList.

Change-Id: I660e0316b11afcad65c0fe7bd167ddcec9239a8b
2017-05-27 10:15:25 +00:00
Sean Dague 99c690f57e Migrate to oslo request_id middleware - mv 2.46
In order to support cross project request_id tracking, we need to be
on oslo.middleware for request_id. This makes that change now that
oslo middleware can support compat headers.

api-ref is not updated yet because x-compute-request-id was apparently
never documented there, and the timing on landing this is narrow
because the moment a requirements update happens we'll have this new
behavior.

Part of bp:oslo-middleware-request-id

Change-Id: I4d9f91b01de12cd0a676fc649953f98473b6b416
2017-05-27 10:11:44 +00:00
Jenkins dd1a3ac5ae Merge "libvirt: remove glusterfs volume driver" 2017-05-26 19:19:04 +00:00
Eric Berglund aaae213bf3 Add strict option to discover_hosts
This adds a --strict option that can be passed in when calling the
nova-manage cell_v2 discover_hosts command. When this option is used,
the command will only return success if a new host has been found.
In any other case it is considered a failure.

Closes-Bug: #1692982

Change-Id: I942af11a3987e1edce67423c66931ad9ece65587
2017-05-24 13:48:54 +00:00
Matt Riedemann e8d8558531 doc: add cells v2 FAQ on mapping instances
This came up in IRC where someone upgraded from newton to
ocata and didn't use the simple_cell_setup command, but they
didn't run the map_instances command. Our cells v2 deploy/upgrade
guide mentions using simple_cell_setup for the minimal scenario
so it wasn't clear that they needed to run map_instances.

The install guide doesn't mention any of this either since this
is about upgrades, and the install guide is focused on fresh installs
where there are no existing instances to map.

Change-Id: Iedf3aabf1508abf59a54071b20a7f1c58b63e32c
2017-05-23 12:55:17 -04:00
Matt Riedemann 7c1018a118 doc: add cells v2 FAQ on refreshing global cells cache
There is a cells cache in the API and in the request context,
which is used in the controller services (api, conductor, and
scheduler), so this adds a FAQ item about needing to restart
those services if you update the db connection or transport url
in a given cell which is already cached.

Change-Id: I56daf87dad9e86f747e945f0842344ddba42b91e
2017-05-23 12:38:52 -04:00
Matt Riedemann 64ed7a2824 doc: start a FAQs section for cells v2
We get random questions about cells v2 in IRC and some of them
are repeats, and some are just good questions which took some
thought to answer, so we should document those so they aren't
lost.

This is the start of a series, so it adds an initial question.

Change-Id: I96005d1b86bb92f71a5cc848afd2d0126dd9071a
2017-05-23 12:24:11 -04:00
Matt Riedemann bc783fe5be doc: add links to summit videos on cells v2
We've had a couple of nice presentations on cells v2
from previous summits. This change links those into the
top-level cells v2 docs in the devref. Note that I
consciously put them before the Manifesto section as
that might be somewhat dated at this point, but it would
also be nice as someone new to watch a presentation before
digging into prose for the details. I also elected to avoid
adding yet a third "References" section to this page since
the other ones are specifically references for install and
upgrade scenarios.

Change-Id: I8e60e018cd103e18dd34c3f9cbdd409ec6550a97
2017-05-23 11:22:17 -04:00
Jenkins 931c3f4818 Merge "Correct the wording about filter options" 2017-05-22 17:20:29 +00:00
Takashi NATSUME cbf83a01fb api-ref: Example verification for servers-actions.inc
* Example for the rebuild action

  The functional test is modified and
  the example is replaced with v2.26 examples.

* Example for the rescue action

  The example in API reference is replaced with
  the example with 'rescue_imgae_ref'.

Parameters for the rebuild action and the rescue action
are also fixed.

The patch completes the parameter verification and
the example verification of servers-actions.inc.

Change-Id: Iaf8808b13d1fdfead50da4cd447b3893578f76dd
Implements: blueprint api-ref-in-rst-pike
2017-05-22 00:19:19 +00:00
Jenkins 5df773c93b Merge "nova-manage: Deprecate 'log' commands" 2017-05-19 23:51:35 +00:00
Jenkins d05f6bdf07 Merge "nova-manage: Deprecate 'project', 'account' commands" 2017-05-19 23:49:21 +00:00
Jenkins 3806ead0e0 Merge "Deprecate scheduler trusted filter" 2017-05-19 21:56:56 +00:00
Stephen Finucane 0ace1a9b25 nova-manage: Deprecate 'log' commands
These aren't maintained and their usefulness is questionable, given the
availability of logs in '/var/log/' and the plethora of powerful tools
(Logstash) that can be used to parse these logs in large deployments.

Change-Id: I685512a17b8aea700fadf167571f37ecf1874861
2017-05-19 16:07:49 -04:00
Stephen Finucane 3d269c5302 nova-manage: Deprecate 'project', 'account' commands
Most of these operations can be accomplished using the REST API [1],
with the 'quota_usage_refresh' command being the sole exception. This
particular command is duplicated in a new category - quota - thus
allowing us to fully deprecate the entire 'project' and 'account'
categories.

Note that the '(project|account) quota_usage_refresh' command has been
named 'quota refresh' and not 'quota usage_refresh'. This is because
cliff, which will be used by 'nova-manage' in the future, does not
support underscores in command names.

[1] https://developer.openstack.org/api-ref/compute/#quota-sets-os-quota-sets

Change-Id: Ic02a96802d2a38ed9c4e00991a6bd2088dfcffc6
2017-05-19 16:01:36 -04:00
Matt Riedemann 5c5bc57d2b libvirt: remove glusterfs volume driver
Cinder deprecated the GlusterFS volume driver
in Newton and deleted it in Ocata:

I10c576602dd0e65947d1a1af5d04b8ada54f4625

Since it's unused, unmaintained and unsupported in
Cinder we should remove it from the libvirt driver.

This also removes the related configuration options.

A note is left in the code since I'm unsure if anything
relies on checking for the netfs disk source_protocol which
was added at the same time as the glusterfs support in
Ic6dd861b40b692b25df67c9d5b63fd436c690fde.

Change-Id: I2745f5578646ec994b53f6b5c0a5f62637b0948a
2017-05-19 14:51:42 -04:00
Mike Perez 82f16b88f3 Deprecate scheduler trusted filter
Due to being marked experimental since it has existed on May 28, 2012
with no real activity of development since, this filter is being
deprecated.

mailing list discussion:
http://lists.openstack.org/pipermail/openstack-operators/2017-May/013371.html

Change-Id: If6e53feeb97e6050c1eb7962110ed89504c952fc
2017-05-19 14:45:12 +00:00
Jenkins 791fdf12f3 Merge "Trivial fix typo in document" 2017-05-19 12:26:57 +00:00
Jenkins a444a61274 Merge "api-ref: Fix examples for add/removeFixedIp action" 2017-05-16 11:25:48 +00:00
Jenkins 221427a043 Merge "Add uuid to service.update notification payload" 2017-05-15 10:40:37 +00:00
Takashi NATSUME 2376ae1687 api-ref: Fix examples for add/removeFixedIp action
The nova-network has been deprecated since Newton.
In neutron case, a network ID is a UUID.
So replace an integer network ID with a UUID
in the addFixedIp action example.

The format of removeFixedIp action example
is fixed.

Change-Id: Icaaf25e7648a75b66f6fcaddd759fdf243810db4
Implements: blueprint api-ref-in-rst-pike
2017-05-15 01:19:54 +00:00
Takashi NATSUME 5532d6f404 Add a functional test for 'removeFloatingIp' action
Add a functional test for 'removeFloatingIp' action.
Rename the example file for 'addFloatingIp' action
to clarify that it is a request body example.

Change-Id: Ic865318fa640eb17d1317fb3d5f064788ebf44e7
2017-05-08 19:32:53 +00:00
EdLeafe 2993d8d4fa Correct the wording about filter options
The current docs on the Filter Scheduler imply that filters can be
specified per request. This is not the case, so this change corrects
that page to remove this incorrect language, and make clear that only
the filters specified in the config file will be used.

Closes-Bug: #1689339

Change-Id: I3459a894481cab7d3961ef875015e2b8011e9a58
2017-05-08 16:10:43 +00:00
Ngo Quoc Cuong 08438d2f74 Trivial fix typo in document
Change-Id: I6f008218b20babec2678d0c34b970cbeb5c432b1
2017-05-08 13:38:19 +07:00
Jenkins 7a03047212 Merge "XenAPI: update support matrix to support detach interface" 2017-05-07 21:01:58 +00:00
Jenkins f7f8d81e2e Merge "Fixed a broken link in API Plugins document" 2017-05-06 07:02:40 +00:00
Jenkins 022361fb76 Merge "Replace newton to release_name in upgrade.rst" 2017-05-05 17:52:21 +00:00
Jenkins 55a79f3bd7 Merge "Transform instance.volume_detach notification" 2017-05-05 17:50:19 +00:00
Jenkins bf5c0ffc76 Merge "Transform instance.volume_attach.error notification" 2017-05-05 13:34:56 +00:00
Matt Riedemann 14732e5571 Add uuid to service.update notification payload
Now that the services table has a uuid field and we'll be exposing
that out of the REST API, we should include the uuid in the
service.update notification payload.

Part of blueprint service-hyper-uuid-in-api

Change-Id: I8c400086a8dce9317a39f7e65c8d098d93af335d
2017-05-04 13:57:09 -04:00
shaofeng_cheng acbec41a69 Replace newton to release_name in upgrade.rst
Replace newton to release_name to avoid such updates
for each new release.

Change-Id: I9f580fb00eabff90e7581af10b323592c22737c3
2017-05-04 16:03:59 +08:00
Jenkins 31840ddfba Merge "Transform instance.volume_attach notification" 2017-05-04 00:23:33 +00:00
Jenkins 03e76353a8 Merge "devref and reno for nova-{api,metadata}-wsgi scripts" 2017-05-03 16:12:44 +00:00
Jenkins 0a7965030d Merge "Remove unnecessary execute permissions" 2017-05-03 11:47:51 +00:00
Jenkins 19fdd69048 Merge "Remove nova-cert leftovers" 2017-05-03 03:26:50 +00:00
Gábor Antal 7fe677d71b Transform instance.volume_detach notification
Transform instance.volume_detach notification

Implements: bp versioned-notification-transformation-pike
Change-Id: I2d9af7c146681b2a20a1f1d8360c81d2e7d96796
2017-05-02 16:42:27 -04:00