Nova creates a session back to keystone to verify project ids for
quota and flavor access APIs. The session that was being created was
not based on conf options, so it only worked in simple default
scenarios. This updates the session by using the newly added keystone
section to utilize keystoneauth1 to manage the session creation, which
allows for specifying custom site certificates to secure the link
between Nova and Keystone.
Change-Id: Ice4b226fdabdfb66e60b61de05ac8f3b37610661
Closes-Bug: 1704798
Having utilities that are named after the context they use that no
longer exists is going to be super confusing later. Move these to
a better place.
Change-Id: Id203aa6c02c3b486f63151b3607e928990a6ca7b
blueprint: hurrah-for-privsep
We haven't had a doc wide index or mod index in this
section on the main page for a long time, so it's a
weird title for just having a link to the search page.
This renames the section title, describes the link and
also links to the openstack-wide docs search page.
Change-Id: Idf63e6035841c8ff0ec1aa9bd2994fedf53555b1
Unregister the ResourceProvider 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 ResourceProvider class
* where objects.ResourceProvider is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: I564a4a10c9f07883025df70fecb1a59d547ef7ed
Unregister the ResourceProviderList 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 ResourceProviderList class
* where objects.ResourceProviderList is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: Icf1122ba856664fac4de7efa304ce6908e46f6d4
Unregister the Inventory 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 Inventory class
* where objects.Inventory is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: Ideca0f09f5dc4ba6bb194a2413ed93cf592dd963
Unregister the InventoryList 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 InventoryList class
* where objects.InventoryList is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: Ic11bbef4ccbf1f3df1d50837c49e8a4cbd4ba572
Unregister the Allocation 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 Allocation class
* where objects.Allocation is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: Ib026438b5f843fce848277347a95f3c4b6f94fb1
Unregister the AllocationList 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 AllocationList class
* where objects.AllocationList is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: I554380e9b427a6c12261929989536d95086b3e0b
Unregister the UsageList 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 UsageList class
* where objects.UsageList is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: Id1d3aeaf5831e0804016e98511f719705e9da706
Unregister the ResourceClass object because we do not need RPC
and versioning for the objects in nova.objects.resource_provider.
There are three primary changes here:
* unregistering the ResourceClass class
* where objects.ResourceClass is used, point directly to the
nova.objects.resource_provider package instead
* move the CUSTOM_NAMESPACE for resource class names to the the fields
object. This avoids an import loop and also makes more sense as
the field represents the name.
Partially-Implements: bp placement-deregister-objects
Change-Id: If537c786ea1a61383d82bad9a1de86c25c6cdbd2
Unregister the ResourceClassList 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 ResourceClassList class
* where objects.ResourceClassList is used, point directly to the
nova.objects.resource_provider package instead
Partially-Implements: bp placement-deregister-objects
Change-Id: I109cceb08050b2714c2a2409bf4674f718ab29d6
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
A 400 is returned when making an allocation with a resource class that
does not exist, however the error message refers to whatever the most
recent resource provider uuid was rather than the one that was given
the bad resource class. Since the exception happens outside the loop
that creates the allocations we don't have the association to resource
provider uuid, but we do know which consumer uuid, so report that
instead.
Change-Id: I81dc6b566c6cca0b7d2ac267c3e632c8ae8cfb47
Closes-Bug: #1714402
The member_of query parameter was new in 1.3.
The resources query parameter was new in 1.4.
As a result, the 'resources' parameter description used for
allocation_candidates has to be decoupled since the entire
allocation_candidates API was new in 1.10 and is not specified
per parameter.
Change-Id: I6e0688b4a12212ace98a6876132735094df84b77
Closes-Bug: #1716046
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>
The aggregate.remove_host.start and aggregate.remove_host.end notifications
has been transformed to the versioned notification framework.
Note that the legacy event_type was aggregate.removehost but the versioned
notification is named to aggregate.remove_host to keep the naming consistent
with the other event_types.
Implements: bp versioned-notification-transformation-queens
Change-Id: I5cb84eb797ca98964a04b5b495fba263db98a54f
The aggregate.add_host.start and aggregate.add_host.end notifications
has been transformed to the versioned notification framework.
Note that the legacy event_type was aggregate.addhost but the versioned
notification is named to aggregate.add_host to keep the naming consistent
with the other event_types.
Implements: bp versioned-notification-transformation-queens
Change-Id: I980d89f47b944116e5fc9cedd74c43bbd88fbeae
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