It's Ussuri. We can *finally* stop testing Python 2 [1]. Time to party.
We don't attempt any cleanup but simply stop testing with Python 2,
indicate that we only support Python 3 via 'setup.cfg' and remove any
Python 2 only dependencies. Our 'tox.ini' is modified such that
'functional' now runs with 'python3', whatever that may point to, though
the gate will only use a versioned variant (currently
'functional-py36').
This should free up a significant amount of resources from the gate and
let us start using Python 3 idioms in our code. Win-win.
[1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html#python2-deprecation-timeline
Change-Id: Ie1a0cbd82a617dbcc15729647218ac3e9cd0e5a9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
- pbr hasn't need the hook configuration since forever [1]
- We don't distribute eggs, so there's no need to include configuration
for same
- nova-based entrypoints are grouped
- The 'wheel' group is renamed to 'bdist_wheel' [2]
[1] c84876dc0f
[2] f7c9878712
Change-Id: I1bc60eab58055bd6217ddb7c7c5c2e3bd6fb539e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
There was only one sub-module in 'nova.common' but its presence
interferes with tab complete for the majority of people that want
'nova/compute'. Just move that sub-module to its own top-level module
and be done.
Change-Id: Iee886d915577f347e1ee4f54133ae0f87ae75841
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Obliterate all references to the aforementioned service. This mostly
consists of removing the core service and any references to the now
removed '[workarounds] enable_consoleauth' configuration option.
Part of blueprint remove-consoleauth
Change-Id: I0498599fd636aa9e30df932f0d893db5efa23260
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: Icfc175c49a1fc650d1c9ad06b77209a70c6386db
This goal is to implement the process set out in the 2018-10-24 Python
Update Process TC resolution[1], for the Train cycle to ensure unit
testing is in place for all of the Tested Runtimes for Train[2].
In practice, this generally means adding unit tests for Python 3.7 and dropping
unit tests for Python 3.5. Using the Zuul template for Train will ensure that
all projects that support Python3 will be tested against the agreed runtime
versions, and make it easier to update them in future.
[1]https://governance.openstack.org/tc/resolutions/20181024-python-update-process.html
[2]https://governance.openstack.org/tc/reference/runtimes/train.html
Change-Id: I095770fabafda1a7735c2711d4df061a6dc2bb78
Depends-On: https://review.opendev.org/#/c/641878/
This finalizes the removal of the placement code from nova.
This change primarily removes code and makes fixes to cmd,
test and migration tooling to adapt to the removal.
Placement tests and documention were already removed in
early patches.
A database migration that calls
consumer_obj.create_incomplete_consumers in nova-manage has been
removed.
A functional test which confirms the default incomplete
consumer user and project id has been changes so its its use of
conf.placement.incomplete_* (now removed) is replaced with a
constant. The placement server, running in the functional
test, provides its own config.
placement-related configuration is updated to only register those
opts which are relevant on the nova side. This mostly means
ksa-related opts. placement-database configuration is removed
from nova/conf/database.
tox.ini is updated to remove the group_regex required by the
placement gabbi tests. This should probably have gone when the
placement functional tests went, but was overlooked.
A release note is added which describes that this is cleanup,
the main action already happened, but points people to the
nova to placement upgrade instructions in case they haven't
done it yet.
Change-Id: I4181f39dea7eb10b84e6f5057938767b3e422aff
We're going to start unpicking this stuff from the top down. Start with
the 'nova-cells' executable itself.
Part of blueprint remove-cells-v1
Change-Id: I5bd1dd9f1bbae7a977ab9e032c4f4d200c35e193
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
openstack-dev was decomissioned this night in https://review.openstack.org/621258
Update openstack-dev to openstack-discuss
Change-Id: If51f5d5eb710e06216f6d6981a70d70b6b5783cc
The CachingScheduler has been deprecated since Pike [1].
It does not use the placement service and as more of nova
relies on placement for managing resource allocations,
maintaining compabitility for the CachingScheduler is
exorbitant.
The release note in this change goes into much more detail
about why the FilterScheduler + Placement should be a
sufficient replacement for the original justification
for the CachingScheduler along with details on how to migrate
from the CachingScheduler to the FilterScheduler.
Since the [scheduler]/driver configuration option does allow
loading out-of-tree drivers and the scheduler driver interface
does have the USES_ALLOCATION_CANDIDATES variable, it is
possible that there are drivers being used which are also not
using the placement service. The release note also explains this
but warns against it. However, as a result some existing
functional tests, which were using the CachingScheduler, are
updated to still test scheduling without allocations being
created in the placement service.
Over time we will likely remove the USES_ALLOCATION_CANDIDATES
variable in the scheduler driver interface along with the
compatibility code associated with it, but that is left for
a later change.
[1] Ia7ff98ff28b7265058845e46b277317a2bfc96d2
Change-Id: I1832da2190be5ef2b04953938860a56a43e8cddf
ChanceScheduler is deprecated in Pike [1] and will be removed in a
subsequent release.
[1] https://review.openstack.org/#/c/492210/
Change-Id: I44f9c1cabf9fc64b1a6903236bc88f5ed8619e9e
This adds a granular policy checking framework for
placement based on nova.policy but with a lot of
the legacy cruft removed, like the is_admin and
context_is_admin rules.
A new PlacementPolicyFixture is added along with
a new configuration option, [placement]/policy_file,
which is needed because the default policy file
that gets used in config is from [oslo_policy]/policy_file
which is being used as the nova policy file. As
far as I can tell, oslo.policy doesn't allow for
multiple policy files with different names unless
I'm misunderstanding how the policy_dirs option works.
With these changes, we can have something like:
/etc/nova/policy.json - for nova policy rules
/etc/nova/placement-policy.yaml - for placement rules
The docs are also updated to include the placement
policy sample along with a tox builder for the sample.
This starts by adding granular rules for CRUD operations
on the /resource_providers and /resource_providers/{uuid}
routes which use the same descriptions from the placement
API reference. Subsequent patches will add new granular
rules for the other routes.
Part of blueprint granular-placement-policy
Change-Id: I17573f5210314341c332fdcb1ce462a989c21940
While this option itself was not technically deprecated,
the option only had two choices and the "ironic_host_manager"
choice has been deprecated since Queens:
Iebc74a09990dcda8cf0ee2a41f9ae1058d2a182a
And was removed in Rocky:
I695b250c82c8dcedcd8e2bee00c56bb2df19212c
Since the host_manager option only had one choice, which
is also the default, it's not really an option anymore and
we can simply remove it. Setting it will have no effect
so there should be no upgrade impact for its removal.
Change-Id: Ic61ae3a4f563aa54a3a2956667c702a81e610fc3
The use_baremetal_filters and baremetal_enabled_filters were
deprecated in Pike: I843353427c90142a366ae9ca63ee4298b4f3ecd4
The IronicHostManager was deprecated in Queens:
Iebc74a09990dcda8cf0ee2a41f9ae1058d2a182a
Note that the NUMATopologyFilter should be OK in a mixed
VM/BM deployment because ironic compute nodes will not
report 'numa_topology' so those "hosts" will be filtered
out from requests for a specific NUMA topology or CPU
policy.
This change drops the deprecated baremetal scheduling options
and since the IronicHostManager is really only useful when
using those scheduling options, it is also removed.
Baremetal scheduling is now required to go through resource
classes.
Change-Id: I695b250c82c8dcedcd8e2bee00c56bb2df19212c
The Project Testing Interface [1] asks that we list requirements in
'doc/requirements.txt' and build docs by calling 'sphinx-build' directly
instead of via the 'build_sphinx' setuptool/distutils wrapper. Start
doing this.
[1] https://governance.openstack.org/tc/reference/project-testing-interface.html
Change-Id: If9342c8ea757b1735f2488db751008984fb33baf
An recent change in pbr changed the default behavior of pbr's variants
of the 'sphinx_build' setuptools plugin [1]. Previously, pbr defaulted
to building both HTML and man page output, but it now builds only the
former. nova happens to be one of the rare projects that _does_ care
about man pages so mitigate the impact of this change by explicitly
setting the 'builder' configuration option to build HTML and man page
output.
While we're at it, the 'build_apiguide' section is removed as this
doesn't actually do anything and is a remnant of a broken cookiecutter
file [2].
[1] https://review.openstack.org/#/c/456157/
[2] https://review.openstack.org/#/c/448164/
Change-Id: I79efedd44b11c9832ae8cb36e54c2567f85fcf50
The use_baremetal_filters and baremetal_enabled_filters options
along with the ExactRamFilter, ExactCoreFilter and ExactDiskFilter
filters were all deprecated in Pike:
I843353427c90142a366ae9ca63ee4298b4f3ecd4
The IronicHostManager is configurable and relies on those options,
so if those options are deprecated then the IronicHostManager should
also be deprecated.
The sticky part with this is going to be filters that don't work with
ironic nodes today, like the NUMATopologyFilter, so a note is left
in the use_baremetal_filters option code to remind us that we can't
likely remove any of this until all filters work with ironic nodes.
Change-Id: Iebc74a09990dcda8cf0ee2a41f9ae1058d2a182a
The executable is 'nova-policy' - not 'nova-policy-check'.
Change-Id: I3e875a3284935cbb9607f01c7139982da0e11945
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
I can't see any evidence that anyone else uses our nova-idmapshift
binary, and it adds a lot of complexity (flags we never call for
example). Move the code we do actually use into the privsep
directory and simplify our calls to it. Remove the extra binary
from our install and documentation.
Change-Id: Ibce28d20d166da154833376cf51f1877b829925e
blueprint: hurrah-for-privsep
In order to make it simpler to use the default
configuration files when deploying services
from source, the files are added to pbr's
data_files section so that the files are
included in the built wheels and therefore
deployed with the code. Packaging and deployment
tools can then more easily use the default files
if they wish to.
This pattern is already established with similar
files for neutron and the glance metadefs as has
been mentioned in the related bug report.
Change-Id: I66e6525338e06f289a20ff2cdc2d108ffd6d30b2
Closes-Bug: #1718356
Few microversions unittest still depend on the stevedore to load few
fake controller. This patch uses the plain routes to instead of stevedore.
For the unittest can injects routes which are used for test, the `custom_routes`
parameter is added to the APIRouterV21.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I1a7c653ab21be41b1a41f748a35ec9a57dd8b15d
The extension/plugin mechanism is removed from the Nova API. This
patch removed related unittest.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I1c5a1dccb08bd0b869cb206b247d6cb744e76163
This patch adds versions related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova
To support the redirection from '' to '/', this patch also
enables to put a target patch instead of a dict with supported
methods in the ROUTE_LIST.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: Iba340c5dd66cf9d006e2e8d3d0674b2140915014
This patch adds extension_info related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I07c5e0dc34042d4f3cea8b1b933b11a624ec9512
This patch adds os-snapshots related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: If2f073066fc4df533138409eec6c8ac0dd44d00a
This patch adds os-baremetal-nodes related routes
by a plain list, instead of using stevedore. After all the Nova
API endpoints moves to the plain routes list, the usage of stevedore
for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I2df8f897cf2d53d01e5e9156efbcddd7aa988473
This patch adds os-security-group-default-rules related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: Ifd7c8fc508c0afdb3ce14a4514862805a1569a8b
This patch adds os-security-group-rules related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
The API sample tests are missed for os-security-group-rules API,
this patch adds them to ensure the route working correctly.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I2d3ac79fdb0314014f4b8b69a9c5f27a922d9046
This patch adds image-metadata related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I466d2e1693f56ee32fa32fd74789f88c1d0a1f7c
This patch adds images related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I884dbfef8032a34d155a7022037f5690d86ef532
This patch adds os-networks related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from
Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I49a424979394d0de7d8eae564468e29ee94b8bfa
This patch adds os-cells related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: Iec6e720b4e225251ce06ddfecb316569f9260913
This patch adds os-remote-consoles related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: Id192220445e296656eedb79e39042cd00bbe65a7
The stevedore will be removed from the nova API code. And the extension info
API already is implemented by a hard-code list. So this multiple create extension
entry is useless anymore.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I57caf68d62393b32f800300d4504dd726c3a37c4
This patch adds os-tenant-networks related routes by a plain list,
instead of using stevedore.
After all the Nova API endpoints moves to the plain routes list,
the usage of stevedore for API loading will be removed from Nova.
Partial-implement-blueprint api-no-more-extensions-pike
Change-Id: I54c03a5ec3311677fc095425b71c2b590ff5c987