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
This suppresses a warning from SQLA which is only popping up in the
tests. Something we can and should avoid.
Change-Id: I3d1cf3a5dd817e0896809145fcb8fdd25a3a5d78
When evacuation fails with NoValidHost, the migration status remains
'accepted' instead of 'error'. This causes problem in case the compute
service starts up again and looks for evacuations with status 'accepted',
as it then removes the local instances for those evacuations even though
the instance was never actually evacuated to another host.
Change-Id: I06d78c744fa75ae5f34c5cfa76bc3c9460767b84
Closes-Bug: #1713783
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 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
This is how we've standardized on checking for extensions. Use it for
QoS too.
Change-Id: I48c3e41df6133e04be3e25905ff4e168a44534c7
Related-Bug: #1698010
No recent neutron deployment should ever have the 'auto_allocate'
extension missing in its list of extensions.
It appears like this has been the case since at least Mitaka [1].
This simplifies code slightly and allows us to remove a few
now-unnecessary tests.
[1] https://github.com/openstack/neutron/blob/mitaka-eol/neutron/plugins/common/constants.py#L41-L47
Change-Id: Ia420eac4471cdafecfe1ad3d411c494545046c92
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 nova performs a shelve offload for an instance, it needs to terminate
all the volume connections for that instance as with the shelve offload
it is not guaranteed that the instance will be placed on the same host once
it gets unshelved.
This change adds the call to the terminate_volume_connections on the
_shelve_offload_instance method in the compute manager.
Closes-Bug: #1547142
Change-Id: I8849ae0f54605e003d5b294ca3d66dcef89d7d27
This reverts commit 1032c79238e87259cef6963e43c78c39eeeb2cde.
This wasn't actually ready to merge, and now that it has
we're seeing a spike in failures of test_iscsi_volume.
Change-Id: I74649dd63ef82a356b829ea01b2e74640dc6f11c
Related-Bug: #1398999
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
This patch is fixing the translation of the attachment_ref to move the
'connection_info' data under a 'data' key in 'connection_info' and move
'status', 'instance', 'attach_mode', 'attached_at' and 'detached_at' into
'connection_info'.
The patch modifies the translation function that got introduced in this
review: https://review.openstack.org/#/c/486194/ Since introducing the
original function we realized that we haven't captured the original
format of connection_info therefore we added additional modifications here.
Partially Implements: blueprint cinder-new-attach-apis
Change-Id: I8156e4da3c218b5f0cb122f161ff7f640fce00ea