This adds a method to the DB API that lets us query out the next
instance for a sort query, but without a marker UUID. If the marker
is from another cell, we'll need to resume the pagination sequence
based on the sort keys and the values from the marker instance.
This adds the method and a test to be used later.
Change-Id: Ib0e63ec0dd12c2feff562311bd7f69234cf43a1b
Unregister the Trait object because we do not need RPC and
versioning for the objects in nova.objects.resource_provider.
There are two primary changes here:
* unregistering the Trait class
* where objects.Trait is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: I73e08aba095d843b59f73cf2ce8d8d4801740ed2
Since we don't use RPC in placement and intend to never use RPC in
placement it makes little sense to register the resource provider
objects and keep track of their versions. They still need to be
activated as structured objects to get their fields set and properly
inherited.
Tests of versioned objects inspect the dependency trees of objects that
have other objects as fields so this process starts with the TraitList
object. Nothing depends on it. In subsequence patches the other objects
will be unregistered.
There are two primary changes here:
* unregistering the TraitList class
* where objects.TraitList is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: If284b7d595a7dd214a5cd3a322419074dcf0373e
People seem to hate the idea of using tox -epy27 -- foo to use a
test regex so add single quotes around posargs to make it so you can
just do tox -epy27 foo again.
Change-Id: I12c5d2dc78db3bc8954ff420492115ff53c42703
When conductor does the quota recheck, the instances are created
in a cell but when we update the instance and set it to ERROR state,
we were not targeting the context to the cell that the instance lives
in, which leads to an InstanceNotFound error and then the instance
is stuck in BUILD/scheduling state.
This targets the context to the cell when updating the instance.
Change-Id: I45faffaba4d329433a33cfb5e64c89ce4885df46
Closes-Bug: #1717000
Now that we're using stestr directly we have more flexibility on how we
run the osprofiler tests. This patch makes it run second without test
discovery and combines the subunit output with the results of the
previous full test run.
Change-Id: I49db096dd3056a4fd2ec6e6603b59e70a8d25480
The os-testr 1.0.0 release had a couple of required config changes due
to it's internal usage of stestr. This commit fixes those by adding a
.stestr.conf (to remove a warning) sets the fixture env variables in
the tox.ini instead of being hidden in .testr.conf and removing the
quotes around posargs to make passing args to ostestr actually work.
Also to keep the expected dev experience stestr is used directly for
places where ostestr was called directly.
Change-Id: Ib0fbcb2e7710a6b8219c56ef2a4462c61ea498a9
When privsep'ing chown calls, this one was missed. Fix that.
I think this entire method should go away, but it will break at least
one of out tree driver. I'm talking to the powervm guys about a way
forward there.
Change-Id: I8a9bda36728896e60b13c32afda0a7130664cb7b
Closes-Bug: #1716718
Fix AZ related API docs
While we have a big fat comment in the development docs explaining why it's so
terrible to use default AZ values for either booting an instance or setting
an aggregate AZ metadata, we still have confusing API docs that provide the
wrong name for the AZ...
Fixing that and trying to explain the problem within the docs, too.
This reverts commit 92ca21abd61b6df7fc8bc5ffe7502f03b3eca2dd.
Co-Authored-By: Sylvain Bauza <sbauza@redhat.com>
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ie4bfe32bbef0f8060bfc0ad4190f262d4a8bd3b2
This reverts commit 71a7eda44b6da00c05bd3e136d0465086c30e721.
This is breaking the gate due to the change in the az name.
Change-Id: Idd7d1aab113f3d4aba8b1deb6e5dc3871a75aa29
Closes-Bug: #1716247
While we have a big fat comment in the development docs explaining why it's so
terrible to use default AZ values for either booting an instance or setting
an aggregate AZ metadata, we still have confusing API docs that provide the
wrong name for the AZ...
Fixing that and trying to explain the problem within the docs, too.
Change-Id: I811d0f219142ca435b2b206e9b11ccd5ac611997
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
In the unit test tox jobs we run the whole test suite first and after
that exits successfully we also run the osprofiler tests while setting
an osprofiler env variable to enable osprofiler. However the regex isn't
being set properly in ostestr, you set the selection regex with the
--regex flag. [1] This only works by chance because ostestr will pass
any unrecognized args to the subprocess used to run testr internally,
and testr leverages that as a regex. But in the latest os-testr release
it doesn't subprocess internally anymore and this doesn't work. This
commit fixes things to properly set the regex in ostestr so it works in
both old and new versions.
The order of the test runs is also switched because we capture the last
test run's subunit for openstack-health and other analysis, so we want
to full test run to be used for this.
[1] https://docs.openstack.org/os-testr/latest/user/ostestr.html#test-selection
Change-Id: I890505d65ca6043ddbdcc5895f2620391b505756
This lays the groundwork for other tests to get multiple
cells setup in the base TestCase by overriding a variable.
Change-Id: Ic27369dd3711e5b6bf11c98f742b5dc20a3a2799
Related-Bug: #1715493
I don't particularly care about this use case (although the localfs
code should perhaps go away), but it was a nice contained example
of a privsep user which wasn't just calling a command line.
This patch also starts to layout what an API to the privsep'd code
might look like. For now its modelled on python's os module, because
that's where all the operations we perform are coming from.
The rootwrap configuration is cleaned up as we remove users.
Co-Authored-By: Tony Breeds <tony@bakeyournoodle.com>
Change-Id: I911cc51a226d6af29d63a7a2c69253de870073e9
The idea is that each guide should be self contained, even though we can
link between them. Enforce this by duplicating a lot of the content from
the main index page to the user index page.
Change-Id: I160fed0f1b507eba7958666bf38f4138b0f62b3a
Notifications are essentially another API for end users, but
it can be hard to find the list of existing notifications or
their samples which are buried deep down via contributors >
technical reference deep dive > notitfications. If I'm an
end user, I'd like to just see them in the same set of links
on the main page as the API, under the "For End Users" section.
Change-Id: If3ca21b080d06a291ed27c9bcd84a566164c3b70
Now that we have a placement api-ref getting published, we
should link to it like we do for the compute api-ref. This
also links in the placement microversion history for consistency.
Change-Id: Id0c70486c5a72a4d6794d80d350a45a5f356ca37
In the Placement API reference, the GET /traits [1] query parameter
'name' says it accepts a key called 'starts_with'. The actual API
accepts 'startswith' (no underscore).
[1] https://developer.openstack.org/api-ref/placement/#list-traits
Change-Id: I5a1fa51fc751f2492ae6aa2b38893a9e06a26ed1
Closes-Bug: #1714283
If an allocation was made with an empty resources object, a 500 response
code would result. This change adjusts the schema to use minProperties
of 1 to say there must be at least one resource class and value pair in
the allocation. If there is not a 400 response is returned.
As this is fixing 500 response to a useful error, no microversion is
required. A previous gabbi file which demonstrated the problem has been
updated to demonstrate that the problem has been fixed.
Change-Id: I7d9c64c77586564fb3bdbe92c693bd2a1bc06f24
Closes-Bug: #1714072
If the resources object in an allocation request is an empty dict then
there will be a 500 deep in the belly of the AllocationList object
handling when it tries get a information. The patch demonstrates the bug
with a new gabbi test that verfies the 500. The next patch will fix it.
Change-Id: I5ab417e39044af63fb9acb57c48c087ecf1e6f04
Related-Bug: #1714072