placement_dev.rst provides a nova-developer oriented perspective on
the placement API including some explanation of its structure, some
gotchas to be aware of, and some instruction on how to add to it.
Subsequent patches will fill in the missing sections.
Change-Id: Ia571800774aa14beab121c85a693d75fc30ed517
The following warning appears in the nova unit test output (via
PlacementLoggingTest.test_404_no_error_log).
oslo_policy/policy.py:373: DeprecationWarning:
The load_json() method is deprecated as of the 1.5.0
release in favor of load() and may be removed in the 2.0
release.
Change-Id: I9f50027c73c8387c51aef73f0c8fd34976583b89
The AggregateNameExists message can be translated and have unicode in it
so we can't cast it to a str in python 2.7 else we'll get a
UnicodeEncodeError. That would break the online data migration for
aggregates along with any other online data migrations that run after
that one which impacts upgrades.
This uses six.text_type rather than str for logging the error and adds
a test to recreate the bug and show that it's fixed.
Change-Id: I040db22ecbb9fabe5bbda8a3d9600cc9f76cb170
Closes-Bug: #1653261
We have "compute" options and "virt" options but there isn't really a
difference between the two. Move two to "network" and the remainder to
"compute", allowing us to drop "virt".
There are no actual changes to the opts, besides a typo fix for the
'reserved_huge_pages' opt.
Change-Id: Ibe7ba5716c6bfb096aabb85c73e5167f337a7327
Implements: blueprint centralize-config-options-ocata
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
When api opts were moved from ``DEFAULT`` gorup to ``api`` group
the deprecation group was set to ``default`` instead of ``DEFAULT``.
Implements: bp centralize-config-options-ocata
Change-Id: Iebe97cdf8e06ae7d617dfa3b41ec96cca04db14b
This refactors the discover_hosts tests to work with database fixtures
to more realistically test the commands. Recently, a bug was masked
because of mocking of the database APIs.
Related-Bug: #1650694
Change-Id: I6cb45beacce46c6f39861e7ca86be3bd09047b67
There were several release notes which are not yet released
but will be in the o-2 beta so this goes through and cleans up
some typos, broken links and grammar issues.
Change-Id: Ic5bcf43e94e09c59b2e16807c55d84046d90c96f
This patch addresses slowness that can occur when doing a list servers
API operation when there are many thousands of records in the
instance_faults table.
Previously, in the Instance.fill_faults() method, we were getting all
instance fault records for a set of instances having one of a set of
supplied instance UUIDs and then iterating over those faults and
returning a dict of instance UUID to the first fault returned (which
happened to be the latest fault because of ordering the SQL query by
created_at).
This patch adds a new InstanceFaultList.get_latest_by_instance_uuids()
method that does some SQL-fu to only return the latest fault records for
each instance being inspected.
Closes-Bug: #1632247
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Change-Id: I8f2227b3969791ebb2d04d74a316b9d97a4b1571
Add optional parameters 'limit' and 'marker' to the
os-simple-tenant-usage endpoints for pagaination.
/os-simple-tenant-usage?limit={limit}&marker={instance_uuid}
/os-simple-tenant-usage/{tenant}?limit={limit}&marker={instance_uuid}
The aggregate usage totals may no longer reflect all instances for a
tenant, but rather just the instances for a given page. API consumers
will need to stitch the aggregate data back together (add the totals)
if a tenant's instances span several pages.
Implements blueprint paginate-simple-tenant-usage
Change-Id: Ic8e9f869f1b855f968967bedbf77542f287f26c0
The nova/tests/functional/api_sample_tests/test_servers.py contains the
ServersSampleBase class, and in its class definition creates a
'user_data' attribute by base64 encoding a string. However, this will
not work in Python 3, as the base64.b64encode() method requires bytes,
not a string. As a result, importing the test class fails and no tests
get run.
Note that this change doesn't fix all tests to work under Python 3; it
simply fixes the bug that prevents the tests from running at all under
Python 3.
Closes-Bug: #1632856
Change-Id: I35a7b02132bed0387a173b339f6204bf0e3269de
Change ff6b9998bb977421a5cbc94878ced8542d910c9e enforces in
a database migration that you've run the simple_cell_setup
command for cells v2 but the instructions in the error and
in the release note said to use 'nova-manage db' when it should
be 'nova-manage cell_v2'.
Change-Id: I8e71d1c7022d1000f26b7c16ed1c56f6e87ab8ac
Closes-Bug: #1649341
You can currently create a 500 error on mysql by passing | as the name
filter because mysql assumes regex values are well crafted by the
application layer.
This puts in facilities to provide a safe regex filter per db engine.
It also refactors some of the inline code from _regex_instance_filter
into slightly more logical blocks, which will make it a little more
straight forward about where we need to do something smarter about
determining the dbtype in a cellsv2 world.
Change-Id: Ice2e21666905fdb76c001195e8fca21b427ea737
Closes-Bug: 1546396
This makes us automatically set up a usable CellsV2 environment in
the base test case, if we're setting up database stuff. If the test
uses the DB normally, we get a cell0, a real cell, and create
hostmappings for any compute services that we start. If we're not
a DB-using test, we mock out the cell mapping stuff so that
everything appears to just be in the same cell.
This includes a fix for the nova-manage tests, which need to control
their own cells destiny now.
This includes a fix to the pci tests for libvirt, which were starting
the same compute service twice in a row. That no longer works because
we fail to create the duplicate hostmapping record, but we should not
have been doing that anyway. This makes us only create it once.
This includes a fix to the connection switching test to set up the
database fixtures itself since it requires a specific environment
that we now confuse by always going through the CellDatabases fixture.
Change-Id: I435bf18ab66ad1469c03f0cf3027033a5751af6f
APIs listed below are returning 500 error if you pass name more than
255 characters.
1. create resource_classes
2. update resource_classes
Added maxLength check in schema to ensure name should not be more than
255 characters.
Closes-Bug: #1648314
Change-Id: I4ae54f3061fe43d87a656088db1d2ae454eb8237
compute_manager config options were deprecated in
13.0.0, we can remove it now.
Depends-On: I93b62372e357db4f7c39992c244b2ec9e594ad9c
Implements: bp centralize-config-options-ocata
Change-Id: I84503655bd9675ff441073e51059202142db22ab
This fixture makes it trivial to mock out all the cell listing stuff
for the simple case where you just want to assume a single cell that
is configured as the default database.
Change-Id: I7eecee388780677d2b342556fef0179b02707f3c
For testing cells, we will need to track the driver instances that
we give out by url. This normally just works with a conventional
oslo.messaging driver, but the fake driver keeps internal data
structures for simulating its bus. If we end up with clients creating
a new instance of the driver in the rpc switching code, we'll never
be able to send messages to services because we'll always have
private/separate data structures.
So, this makes the fixture wrap the transport creation stuff
and unify references by url. In order to make this work, some
retooling of rpc.init() is done, which makes it more in line with
the recent additions we had for wrapping transport initialization
per connection anyway.
For now, a lot of our tests can't handle the possibility of
multiple RPC connections due to them looking at the global
transport_url configuration. So for the moment, even though this
makes the fixture support multiple independent connections, we
collapse any such attempts down to a single connection to the
default broker.
Note: this requires a fix in oslo.messaging 5.14.0
Depends-On: I01b6f5a20ea9752da46a546a908bd38cf11da681
Change-Id: Icb63d7dabd17f3c5633387793f68a8ba20863a7e