306 Commits

Author SHA1 Message Date
Matt Riedemann
75a7e6fc7d Remove unused os-pci API
The os-pci API was never part of the v2.0 API and was added
to the v3 API, but when the v3 API turned into the v2.1 API
which is backward compatible with the v2.0 API, the os-pci
API was removed from v2.1. The original intent was to enable
it in a microversion but that never happened.

We should just delete this API since it has a number of issues
anyway:

1. It's not documented (which makes sense since it's not enabled).
2. The PciHypervisorController just takes the compute_nodes.pci_stats
   dict and dumps it to json out of the REST API with no control over
   the keys in the response. That means if we ever change the fields
   in the PciDevicePool object, we implicitly introduce a backward
   incompatible change in the REST API.
3. We don't want to be reporting host stats out of the API [1].
4. To make the os-hypervisors extension work in a multi-cell environment
   we'd have to add uuids to the PciDevices model and change the API to
   return and take in uuids to identify the devices for GET requests.
5. And last but not least, no one has asked for this in over two years.

As a result of removing this API we can also remove the join on the
pci_devices table when showing details about an instance or listing
instances, which were added years ago because of the PciServerController:

Id3c8a0b187e399ce2acecd4aaa37ac95e731d46c

Id3e60c3c56c2eb4209e8aca8a2c26881ca86b435

[1] https://docs.openstack.org/developer/nova/policies.html?#metrics-gathering

Closes-Bug: #1426241
Closes-Bug: #1673869

Change-Id: I9099744264eeec175672d10d04da69648dec1a9d
2017-04-18 23:47:40 -04:00
Jenkins
9afa680a81 Merge "Remove domains *-log-* from compile_catalog" 2017-04-10 17:11:33 +00:00
He Jie Xu
56d7c05d3f Remove the stevedore extension point for server create
This patch remove the stevedore extension point for server
create.

This patch move all the extension points into ServersController
class attribute 'server_create_func_list'. This is for
backward-compatible with the stevedore extension interface.

The final goal is that merging all of those extended code into
the ServerController. So this is a middle step for refactor.

Partial-implement-blueprint api-no-more-extensions-pike

Change-Id: I9a8f56037b35e89543626922221b910ab8b1917e
2017-04-06 18:52:11 +00:00
Andreas Jaeger
0057ec5135 Use Sphinx 1.5 warning-is-error
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Migrate the
setting from the old warnerror one.

Change-Id: Icd5cf4c279c566e1eddeede8df11a9d1c4d4c83f
2017-03-03 18:52:56 +01:00
Alfredo Moralejo
2024a927d3 Remove domains *-log-* from compile_catalog
Translation for logs are being retired [1] and compile_catalog
will fail once they are not found.

[1] http://lists.openstack.org/pipermail/openstack-i18n/2017-March/002799.html

Change-Id: I6467340ec583e357c097dbdfd3c16fe5de73eaad
2017-03-01 09:48:13 +00:00
Takashi NATSUME
1585ca189e Fix doc generation warnings
Fix the following warnings.

- A warning in config sample generation
- Warnings about nova-status.rst

Change-Id: Ifcc3b4a89eeea9d0dd62e2a8b560c5e6a9ff3d1a
Closes-Bug: #1659485
2017-02-24 17:43:08 +00:00
Jenkins
99b4bc34ad Merge "conf: remove deprecated image url options" 2017-02-09 12:23:19 +00:00
Maciej Szankin
ff8dcf6dcd conf: remove deprecated image url options
Change-Id: I7687cc89545a7a8b295dd6535b4ccebc913a2e0e
Implements: blueprint centralize-config-options-pike
2017-02-03 21:32:33 +00:00
OpenStack Proposal Bot
9385eaff09 Updated from global requirements
Change-Id: I740a7d5e9f1740e2b1d1fbd9cff110fa83741e29
2017-01-20 19:43:54 +00:00
Dina Belova
ecc8de8d6c Integrate OSProfiler and Nova
* Add osprofiler wsgi middleware. This middleware is used for 2 things:
  1) It checks that person who want to trace is trusted and knows
     secret HMAC key.
  2) It starts tracing in case of proper trace headers
     and adds the first wsgi trace point with info about the HTTP request

* Add initialization of osprofiler on start of a service
  Currently that includes oslo.messaging notifier instance creation
  to send Ceilometer backend notifications.

oslo-spec: https://review.openstack.org/#/c/103825/
python-novaclient change: https://review.openstack.org/#/c/254699/
based on: https://review.openstack.org/#/c/105096/

Co-Authored-By: Boris Pavlovic <boris@pavlovic.me>
Co-Authored-By: Munoz, Obed N <obed.n.munoz@intel.com>
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Co-Authored-By: Tovin Seven <vinhnt@vn.fujitsu.com>

Implements: blueprint osprofiler-support-in-nova
Change-Id: I82d2badc8c1fcec27c3fce7c3c20e0f3b76414f1
2017-01-18 15:00:14 +07:00
Matt Riedemann
a1f3a5946a Add nova-status upgrade check command framework
This adds the basic framework for the nova-status
upgrade check commands. Follow up patches will flesh
this out to perform cells v2 and placement API related
upgrade status checks.

A man page is added for the new CLI and as part of that
the man page index is sorted.

Part of blueprint cells-scheduling-interaction
Part of blueprint resource-providers-scheduler-db-filters

Change-Id: I687dd7317703a1bb76c197ebba849ca368c0872e
2016-12-19 16:40:50 -05:00
Mike Perez
c07c0d4b8e Remove deprecated nova-all binary
This was deprecated and to set to be removed in Ocata. It was only
intended for testing purposes and not for production use. Individual
binaries will be used instead.

Change-Id: I260962ec7c4167b07e9480a04454a9cb5666f8ed
2016-10-12 10:02:17 -07:00
Jenkins
c52920aced Merge "Adds nova-policy-check cmd" 2016-09-01 17:56:56 +00:00
Sean Dague
d957bfb9f1 create placement API wsgi entry point
We want a wsgi_script as the entry point for our placement API
actually getting run, this is wrapping in the smooth and mellow pbr
patterns that make it sensible to also run just by starting it on the
command line.

This also actually initializes the logging subsystem for the placement
API, and does the standard pattern of dumping the configuration if
DEBUG is enabled. Pieces of this were cribbed/inspired by equivalent
keystone code.

The config directory is now setable via environment, which may be be
needed by folks with venvs.

Change-Id: I00d032554de273d7493cfb467f81687c08fd5389
2016-08-30 21:20:08 -04:00
Claudiu Belu
9864801d46 Adds nova-policy-check cmd
This patch adds new command line 'nova-policy'. This is administrator
command line, it is tool for experience the policy discovery which
is still under-development.

Co-Authered-by: Alex Xu <hejie.xu@intel.com>

Change-Id: If4abf0fca043de2cb5c719a53505526f3c0b871b
Implements: blueprint discoverable-policy-cli
2016-08-29 14:59:58 +08:00
Andrew Laski
3b609a52fb Add entry_point for oslo policy scripts
There are two helper scripts in oslo.policy to help deployers understand
their policy configuration better. With the setup.cfg entry these can be
called directly from oslo.policy.

Change-Id: I08dc33367401ec1f98e1795a52d4e981f09a07de
Implements: bp policy-in-code
2016-08-24 16:37:13 -04:00
Matt Riedemann
7596c1f3d9 Remove leftover list_opts entry points
All remaining list_opts methods come from nova.conf.opts
now so remove the last remaining unused (nonexistent)
list_opts registrations.

Change-Id: Idfc9c464bae828dd1d024369cb972401e52ac101
2016-07-28 18:15:13 -04:00
Matt Riedemann
5c08552cc8 Remove nova.cache_utils oslo.config.opts entrypoint
There was never a list_opts method in nova.cache_utils,
and the options registeration was moved to nova.conf.cache
in 466bce576a69d170f1ef08264da7e72ac4a150fb so we can
cleanup the entrypoint.

Change-Id: If02620752c1bb018117f2c6755d9b9661185e4d6
2016-07-28 18:14:12 -04:00
Matt Riedemann
760826f302 Remove neutronv2.api oslo.config.opt entry point
list_opts was moved from neutronv2.api to nova.conf.neutron
in 1b8b0834a07b857ffd9b743e89caf9b604d7f609 so we can cleanup
this broken entry point.

Change-Id: Ie3e1b25b6a0117aed2f87d1fd6ecaab35201349f
2016-07-28 18:14:11 -04:00
Jenkins
317f7d758c Merge "Add policy sample generation" 2016-06-29 14:32:04 +00:00
Andrew Laski
5e38fa3cb5 Add policy sample generation
This adds the entry point and config file necessary for using the
oslo.policy sample generation script. It also adds a tox target to
simplify the usage of it.

The command is also run in the docs tox target since the sample file
can be considered documentation.

Change-Id: I18a1fa567fc04b0e0a37c02f20024b2ce483f060
Partially-Implements: bp policy-in-code
2016-06-28 20:52:44 +00:00
Sean Dague
76b58b8f89 remove personality extension
This removes personality extension, as well as the rebuild extension
point for servers.

We add an operation flag to translate extension because personality
extension uses different kwarg names depending on the operation. This
is done with a set of constants which should prevent typos silently
causing failures.

A few variables are renamed in servers.py to avoid multiline
statements.

Part of bp:api-no-more-extensions

Change-Id: I47deae0279f85d9a355d1248b6e90af732406514
2016-06-24 14:44:53 -04:00
Sean Dague
f26739394f remove preserve-ephemeral rebuild extension
This folds this back into the main rebuild flow. As there were no unit
tests for this, doing so was pretty simple.

Part of bp:api-no-more-extensions

Change-Id: I19f791ed5af917b5509940765fedc1b944fcf315
2016-06-24 14:32:23 -04:00
Sean Dague
600480e59d remove access_ips extension
Part of bp:api-no-more-extensions

Change-Id: Id48dfdf29bb6b250ad505428bd034074cb611cc1
2016-06-24 14:32:23 -04:00
Sean Dague
525285eb1c remove os-disk-config part 4
There are no test changes as all new code is tested by the
extension_info functional tests, and should we want to eliminate the
extension_info portion of our API later, new tests would just make
this much harder to tear down.

This modifies default policy to drop os-disk-config as well as
modifying extension tests to pass even though we're injecting
additional hardcoded items into the list for compatibility.

Part of bp:api-no-more-extensions

Change-Id: I0192ccef7e858fd0ff15c339f683abaabbdc09b7
2016-06-22 07:36:33 -04:00
Jenkins
9ee416ec0a Merge "Remove the nova.compute.resources entrypoint" 2016-06-21 19:37:45 +00:00
Jenkins
974b158f4f Merge "Tear down of os-disk-config part 2" 2016-06-20 13:33:14 +00:00
Matt Riedemann
81540d1dac Remove the nova.compute.resources entrypoint
This was the entrypoint namespace for
compute resources which was deprecated in mitaka
under 649decbaadb1064448ae0a6d25be30fab2451bb4
and removed in newton 49d9433c62d74f6ebdcf0832e3a03e544b1d6c83
so we should also remove the entrypoint.

Change-Id: Idaed7291ab6c3ab122edabfd3d614f42d469a34f
2016-06-17 17:43:58 -04:00
Jenkins
bd3e27ce78 Merge "Improve the help text for cells options (7)" 2016-06-16 10:22:29 +00:00
Sean Dague
56dce766d8 Tear down of os-disk-config part 2
This removes the portions of the os-disk-config extension that handles
additional attributes being passed in during
create/update/resize/rebuild. These are folded directly into
servers.py with a new module wide function for translating REST in =>
attr dict data structures.

Tests which use disk_config as the example for loading and using these
extensions are removed.

As this is the only in tree extension that hooks the resize entry
point, that is fully removed from setup.cfg and well as any extension
manager processing.

Part of bp:api-no-more-extensions

Change-Id: I691a3a917a3dbaa86072d689e9ebf42ba356ca60
2016-06-14 12:07:59 -04:00
Esra Celik
d7d67e409a Improve the help text for cells options (7)
Some comments on `Improve the help text for cells options`
reviews are implemented with this patch.

- nova.cells.opts:list_ops function removed.

Implements blueprint centralize-config-options-newton
Change-Id: Idcaf66f0db1695d4fff34a656df2934c1b6d2ede
2016-06-09 08:39:46 +03:00
Sven Anderson
ece7b8f1e7 Let setup.py compile_catalog process all language files
Two years ago the translation files have been split into several
files, separating the log messages of different log levels from each
other, like X.pot, X-log-warning.pot, X-log-info.pot, and so on.
However, the setup.py command `compile_catalogs`, that comes from the
babel package and compiles the corresponding .po files into .mo
files, only supported one file per python package.  This means that
during packaging `compile_catalogs` never compiled the X-log-*.po
files, so the corresponding translations were always missing.

Since babel 2.3 the domain can be set to a space separated list of
domains.  This change adds the the additional log level files to the
domain list.

The obsolete check that .po and .pot files are valid is removed from
tox.ini.

Change-Id: I0d9cb16ac50caae570c57a1db6bed656bf13c3dc
Closes-Bug: #1536226
2016-05-20 17:56:06 +02:00
EdLeafe
b6dd96c342 Move config options from nova/api directory (5)
This is the fifth and final patch moving config options from the
nova/api directory. In this patch, the deprecated options from the
legacy_v2 directory have been moved to nova/conf/legacy_v2.py. A
subsequent patch will enhance the help text for these options.

Blueprint centralize-config-options-newton

Change-Id: I3fdff0d3c0c2f36155ad4f7060395e788b78d150
2016-05-17 13:07:47 +00:00
Toan Nguyen
32b510aaa0 centralized conf: nova/network/rpcapi.py
Moving the config options, used in nova/network/rpcapi.py
for nova network, to the new central location
"nova/conf/network.py".

Implements: blueprint centralize-config-options-newton

Change-Id: I62f019632e72359711430ad2f017911337f2e30b
2016-05-12 09:35:20 +00:00
Sergey Nikitin
537df23d85 Added server tags support in nova-api
Added new API microversion which allows the following:
- add tag to the server
- replace set of server tags with new set of tags
- get information about server, including list of tags for server
- get just list of tags for server
- check if tag exists on a server
- remove specified tag from server
- remove all tags from server
- search servers by tags

DocImpact
APIImpact

Implements: blueprint tag-instances

Change-Id: I9573aa52aae9f49945d8806ca5e52ada29fb087a
2016-04-06 16:38:21 +03:00
Sean Dague
92a15091e7 Remove auto generated module api documentation
This disables the generation of the raw module api documentation in
our docs target. It is mostly not useful, as it builds a giant tree of
module documentation that are 98% boiler plate lists of methods with
no real content.

We leave the sphinx.ext.autodoc in the conf, which allows you to
specifically pull in modules for documentation when you want
to. doc/source/services.rst is an example of doing this in tree, which
still works after this change.

Change-Id: I4c10a8e45756cdcf612faca574e2fb3b7ffa2bdb
2016-03-18 07:18:07 -04:00
Doug Hellmann
7e784f9be7 register the config generator default hook with the right name
No config generator hooks should ever be registered with a name that
belongs to another project. In this case, using oslo.middleware.cors
means that *every other project* that loads the middleware gets this
application's defaults when the generator is run on a system with
everything installed (such as a dev box with devstack). Use the name
of the app instead, to ensure that the defaults are only set when this
app's sample config and documentation are being generated.

Change-Id: I6a8c7d44b9db9325003ff2fdb667b0ced7739e96
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-03-11 16:02:05 -05:00
Michael Krotscheck
61e581c7d8 Added Keystone and RequestID headers to CORS middleware
This patch makes use of oslo.config's genconfig hooks to add
nova-specific default config values to the generated configuration.
It also adds this same method to nova's configuration parsing logic,
to ensure that these default values are also the ones used at runtime.

Closes-bug: 1551836
Change-Id: Ic799aea89f681ef8626e996f0357ade388f76ca9
2016-03-02 04:53:11 -08:00
Pawel Koniszewski
c9091d0871 Add new API to force live migration to complete
This change adds manual knob to force ongoing live migration to
complete. It is implemented as a new server-migrations API.

DocImpact
ApiImpact

Implements: blueprint pause-vm-during-live-migration
Change-Id: I034b4041414a797f65ede52db2963107f2ef7456
2016-02-08 08:59:52 +01:00
Jenkins
bd5eb572ae Merge "Switch to oslo.cache lib" 2016-02-04 19:14:30 +00:00
Jenkins
45003ef03f Merge "Update the home-page" 2016-02-04 18:47:48 +00:00
Fang Jinxing
c610c97bfe Update the home-page
http://www.openstack.org --> http://docs.openstack.org/developer/nova/

Change-Id: I8d0303a9e63d8618af5ed462bc0340b3ff10b639
2016-02-02 23:08:54 +08:00
Davanum Srinivas
205fb7c8b3 Switch to oslo.cache lib
Common memorycache was replaced by analogous tool
from oslo.cache lib. In-memory cache was replaced
by oslo.cache.dict backend. Memcached was replaced
by dogpile.cache.memcached backend.

Implements blueprint oslo-for-mitaka

Closes-Bug: #1483322
Co-Authored-By: Sergey Nikitin <snikitin@mirantis.com>
Co-Authored-By: Pavel Kholkin <pkholkin@mirantis.com>

Change-Id: I371f7a68e6a6c1c4cd101f61b9ad96c15187a80e
2016-02-02 08:20:13 -05:00
Yingxin
33d906a2e0 Use stevedore for scheduler driver
Avoid having to configure the full class path of scheduler driver,
change to load by stevedore driver plugin using entrypoints.

Change 'scheduler_driver' to use entrypoint with the namespace
'nova.scheduler.driver' in 'setup.cfg'. Meanwhile, still maintain the
compatibility for class path configuration until the next major release.

Change all related tests with flag 'scheduler_driver' to use stevedore
entrypoint.

UpgradeImpact - see the reno file attached.
Implements: blueprint scheduler-driver-use-stevedore
Change-Id: I8c169e12d9bfacdbdb1dadf68b8a1fa98c5ea5bc
2016-01-26 03:55:45 +00:00
Yingxin
158c6d64c2 Use stevedore for scheduler host manager
Avoid having to configure the full class path of host manager using
classloader. Change to load the class by stevedore driver plugin using
entrypoints.

Change 'scheduler_host_manager' to use entrypoint with the namespace
'nova.scheduler.host_manager' in 'setup.cfg'. Meanwhile, still maintain
the compatibility for class path configuration until the next major
release.

UpgradeImpact - see the reno file attached.
Change-Id: I3fd42ead44487a21eb5cfaf5a91209277ce30ad0
Partially-Implements: blueprint scheduler-driver-use-stevedore
2016-01-26 03:55:45 +00:00
Jenkins
d4ae85db7f Merge "single point of entry for sample config generation" 2016-01-11 21:50:36 +00:00
Markus Zoeller
627fde8832 single point of entry for sample config generation
To create a "nova.conf.sample" file, we use "tox -e genconfig".
This command triggers the generator from "oslo.config" which needs
entry points in "setup.cfg". Right now we have multiple entry points
to "opts.py" files which are going to be consolidated to one single
point of entry "nova/conf/opts.py". Until all config options are
moved to that central place, we would often face merge conflicts
when multiple contributors commit patches to that one "opts.py".

To prevent that, and to make it easier for future config option
moduls in "nova/conf/", the new "nova/conf/opts.py" module collects
the config options in a dynamic way.

Co-Author: EdLeafe <ed@leafe.com>

bp centralize-config-options

Change-Id: I4e5d643cd93bb2822ff59c71669cedf3de7f86fc
2016-01-08 13:55:26 +00:00
Davanum Srinivas
4140eb4004 Remove Deprecated EC2 and ObjectStore impl/tests
In Id7936be290b6febd18deb4c2db8ea4d678d4d9b1, we removed
entries from api-paste.ini for EC2 API service. In this
review we remove all the unnecessary code, docs and tests
associated with objectstore and ec2 service. Note that this
does not cleanup the Instance object or change any of the
versioned objects. We just drop any code associated with
testing the REST endpoint(s) that are no longer needed.
Also added shims such that the api-paste.ini from liberty
will still work (grenade job) and added logs and response
messages for prompting administrators to cleanup their
old api-paste.ini and switching to the stand alone EC2 API
project for their needs.

Change-Id: I8bf7cbaa7015bb61656ab90ccc8f944aaeebb095
2016-01-08 06:30:20 -05:00
Davanum Srinivas
eec7a55319 Nuke EC2 API from api-paste and remove wsgi support
Tempest has already removed the EC2 API tests in:
Ib5e24e19bcba9808a9f49fe7f328668df77fe4f9

We have a review in devstack below that removes EC2
API service by default.

In this review, we are removing support for the really
old EC2 API support in Nova. Anyone who needs EC2 support
should use the new EC2-API project:
http://git.openstack.org/cgit/openstack/ec2-api/

The necessary changes in Tempest and DevStack are
already merged.  In a follow on review, will remove
the EC2 specific options, code and tests from Nova.

DocImpact

Change-Id: Id7936be290b6febd18deb4c2db8ea4d678d4d9b1
2015-12-21 18:48:15 -05:00
Jenkins
74168636da Merge "Remove version from setup.cfg" 2015-12-04 00:33:12 +00:00