Commit Graph

50084 Commits

Author SHA1 Message Date
Surya Seetharaman 00a0308d2a Update the nova-manage db archive_deleted_rows description
This patch adds the bit about removing the deleted rows from the
instance_mappings and request_specs tables as well permanently so
that the users are aware of this.

Change-Id: I183cc9f80b3feec6789332860b5aeb7591b710df
2018-03-08 00:29:39 +01:00
Zuul 96fb50735c Merge "Allow 'network' in RequestContext service_catalog" 2018-03-07 19:23:04 +00:00
Zuul 9d5757c6e1 Merge "Handle not found error on taking snapshot" 2018-03-07 17:53:37 +00:00
Zuul ab97b28d1d Merge "Fix version cap when no nova-compute started" 2018-03-07 17:26:48 +00:00
Zuul febb1d1171 Merge "hyper-v: Logs tips on PortBindingFailed" 2018-03-07 16:29:24 +00:00
Zuul 489a8f5bf3 Merge "Add a nova-caching-scheduler job to the experimental queue" 2018-03-07 14:55:55 +00:00
Zuul 450be218da Merge "Return 400 when compute host is not found" 2018-03-07 13:42:56 +00:00
Zuul 130777ab0e Merge "Move db MAX constants to own file" 2018-03-07 06:03:44 +00:00
Zuul c1716490cd Merge "Save admin password to sysmeta in libvirt driver" 2018-03-07 01:55:32 +00:00
Zuul f6d4c46c33 Merge "Add more functional test for placement.aggregates" 2018-03-07 00:55:36 +00:00
Zuul 1f2e702ca6 Merge "Remove MigrationPreCheckClientException" 2018-03-06 23:40:04 +00:00
Hongbin Lu 9ef56fa866 Handle not found error on taking snapshot
If there is a request to create a snapshot of an instance and
another request to delete the instance at the same time, the
snapshot task might fail with libvirt error and this error
is not handled correctly by compute manager. As a result,
tracestack was printed in the compute log.

This patch fixes it by handling libvirt exception during live
snapshot and raise instance not found exception if the libvirt
exception is raised due to domain not found.

Change-Id: I585b7b03753ed1d28a313ce443e6918687d76a8b
Closes-Bug: #1722571
2018-03-06 22:57:48 +00:00
Zuul 52c705cd7b Merge "Fix the notification devref location in exception" 2018-03-06 22:53:08 +00:00
melanie witt 715a3cadb0 Save admin password to sysmeta in libvirt driver
We have an API for setting the admin password for an already created
instance and we have a metadata API for retrieving the encrypted
password. In the libvirt driver, when a request to set the admin
password is received, it is indeed set in the guest but the instance
system metadata is never updated with the encrypted password, so
attempts to retrieve the password via the metadata service API result
in an empty string returned instead of the encrypted password.

This has been broken in the libvirt driver since the set admin password
password feature was added, as far as I can tell. The xen api driver,
however, handles the same thing correctly and this adds similar logic
to the libvirt driver to fix the problem.

Closes-Bug: #1748544

Change-Id: Icf44c4c94529cb75232abe1f3ecc5a4d3646b0cc
2018-03-06 17:34:24 -05:00
Zuul 8fe035f761 Merge "Check for multiattach before removing connections" 2018-03-06 22:13:54 +00:00
Zuul 13588bb8ab Merge "Pass user context to virt driver when detaching volume" 2018-03-06 22:13:45 +00:00
jichenjc a6d456f954 Add more functional test for placement.aggregates
Add more test cases for placement.aggregates to cover some edge case.

blueprint placement-test-enhancement

Change-Id: Ia18de50f3265b358e64523229140ce9a6e70dbbb
2018-03-06 21:46:27 +00:00
git-harry b81a66b3b0 Fix version cap when no nova-compute started
When a zero service version is returned, it means that we have no
services running for the requested binary. In that case, we should
assume the latest version available until told otherwise. This usually
happens in first-start cases, where everything is likely to be up to
date anyway.

This change addresses an issue where the version returned had been
hard-coded to 4.11 (mitaka).

Change-Id: I696a8ea8adbe9481e11407ecafd5e47b2bd29804
Closes-bug: 1753443
2018-03-06 20:14:42 +00:00
John Griffith 139426d514 Check for multiattach before removing connections
With the addition of multiattach we need to ensure that we
don't make brick calls to remove connections on detach volume
if that volume is attached to another Instance on the same
node.

This patch adds a new helper method (_should_disconnect_target)
to the virt driver that will inform the caller if the specified
volume is attached multiple times to the current host.

The general strategy for this call is to fetch a current reference
of the specified volume and then:
1. Check if that volume has >1 active attachments
2. Fetch the attachments for the volume and extract the server_uuids
   for each of the attachments.
3. Check the server_uuids against a list of all known server_uuids
   on the current host.  Increment a connection_count for each item
   found.

If the connection_count is >1 we return `False` indicating that the
volume is being used by more than one attachment on the host and
we therefore should NOT destroy the connection.

*NOTE*
This scenario is very different than the `shared_targets`
case (for which we supply a property on the Volume object).  The
`shared_targets` scenario is specifically for Volume backends that
present >1 Volumes using a single Target.  This mechanism is meant
to provide a signal to consumers that locking is required for the
creation and deletion of initiator/target sessions.

Closes-Bug: #1752115

Change-Id: Idc5cecffa9129d600c36e332c97f01f1e5ff1f9f
2018-03-06 12:04:04 -05:00
OpenStack Proposal Bot 01333a7f18 Updated from global requirements
Change-Id: I788f833403d39d07c338d16b7002657eda22b801
2018-03-06 12:57:20 +00:00
Balazs Gibizer d5f49eda5c Fix the notification devref location in exception
When the doc structure was changed the location of the notification
devref also changed. This patch updates the reference to this doc in
the AssertionError emited in the test if new legacy notification is
introduced.

Change-Id: Iff30752bac64801ad8950eea5861d2b230f30fdf
2018-03-05 17:38:52 +01:00
OpenStack Proposal Bot 35414701c1 Updated from global requirements
Change-Id: I04c27a2a5b5c85861a84c4aed92d056e4d915399
2018-03-05 06:55:05 +00:00
OpenStack Proposal Bot 5d2add7453 Updated from global requirements
Change-Id: Ia9254dd3d6c8d174c7d943430601c9121001c811
2018-03-04 10:16:00 +00:00
Matt Riedemann d2941bfd16 Pass user context to virt driver when detaching volume
We need this in a later change to pull volume attachment
information from cinder for the volume being detached so
that we can do some attachment counting for multiattach
volumes being detached from instances on the same host.

Change-Id: I751fcb7532679905c4279744919c6cce84a11eb4
Related-Bug: #1752115
2018-03-03 06:11:12 -05:00
Zuul fa50107c14 Merge "Updated from global requirements" 2018-03-02 18:46:56 +00:00
Zuul 1848fa318a Merge "Remove compute nodes arg from ProviderTree init" 2018-03-02 17:03:40 +00:00
OpenStack Proposal Bot 5799f5f6df Updated from global requirements
Change-Id: I91e47a7c3c099f70303843a742474bae12133447
2018-03-02 15:15:34 +00:00
Zuul a6edacd66c Merge "Move makefs to privsep" 2018-03-01 21:43:39 +00:00
Zuul aef1961f4c Merge "Convert users of tune2fs to privsep." 2018-03-01 21:43:32 +00:00
Zuul ec5144ce06 Merge "Use dict.get() when accessing capabilities dict" 2018-03-01 18:12:39 +00:00
Zuul f48457cf6d Merge "Enable native mode for ScaleIO volumes" 2018-03-01 13:09:34 +00:00
Zuul 04eb8f2aea Merge "[placement] api-ref: Fix a missing response code" 2018-03-01 12:56:21 +00:00
Zuul ee66ad484a Merge "Remove warning in feature support matrix page" 2018-03-01 12:56:11 +00:00
Zuul 31814746b0 Merge "Address nits in change I7e01f95d7173d9217f76e838b3ea71555151ef56" 2018-03-01 12:55:57 +00:00
Zuul 74009cf45b Merge "Add check for redundant import aliases" 2018-03-01 12:55:48 +00:00
Zuul 5b3f771e09 Merge "Check for leaked server resource allocations in post_test_hook" 2018-03-01 12:55:39 +00:00
Zuul 7426bf33c7 Merge "Remove unused LOG variables" 2018-03-01 12:55:31 +00:00
Chris Dent 7a8415be5c Move db MAX constants to own file
The "MAX" constants in the db api are useful to import without
needing to import the rest of the api, so they are moved to a
constants.py file in the same package. api.py then imports the
symbols from that file for backwards compatibility.

The handler and schema for placement inventories (which use the MAX
constants) are updated to point to the constants file directly as
they do not need the db api.

Change-Id: Ifab10e023bcf4389f6514b477755c4cced2d1598
2018-03-01 11:09:29 +00:00
Zuul 206c4c3fb3 Merge "Remove the deprecated scheduler_driver_task_period option" 2018-02-28 20:45:28 +00:00
Zuul ec4c259a37 Merge "Clarify the help text for [scheduler]periodic_task_interval" 2018-02-28 20:45:20 +00:00
Zuul c1b9450f5d Merge "Stop using mox in api/openstack/fakes.py" 2018-02-28 19:54:55 +00:00
Zuul 2a3bb23a42 Merge "libvirt: mask InjectionInfo.admin_pass" 2018-02-28 17:26:17 +00:00
Thomas Bechtold 3a3b0f09db Allow 'network' in RequestContext service_catalog
When booting instances, nova might create neutron resources. For that,
the network service endpoint needs to be available. Otherwise we run
into:

EndpointNotFound: ['internal', 'public'] endpoint for network service \
not found

Change-Id: Iaed84826b76ab976ffdd1c93106b7bae700a64a9
Closes-Bug: #1752289
2018-02-28 15:51:47 +01:00
Dao Cong Tien 66fefc0ea6 Stop using mox in api/openstack/fakes.py
Notes: fakes.py/stub_out_key_pair_funcs() is already fixed
in another changeset.

Partially-Implements: blueprint mox-removal

Change-Id: I53333eb6f46bf4234de669f52558a256b627af44
2018-02-28 12:08:43 +00:00
Michael Still fef1435167 Move makefs to privsep
Change-Id: I388d31d5e9c1cff10bc534ba69be899e67681ce6
blueprint: hurrah-for-privsep
2018-02-28 07:15:08 +11:00
Michael Still e94151c1c3 Convert users of tune2fs to privsep.
xenapi likes enabling and disabling ext3 filesystem journals. They can
do that via privsep now.

Change-Id: Iad8198fbd01aa80bde0a6b295963391715c5cd48
blueprint: hurrah-for-privsep
2018-02-28 07:14:51 +11:00
Zuul 4bac420d85 Merge "Handle spawning error on unshelving" 2018-02-27 17:52:29 +00:00
Zuul 804d695759 Merge "Make _get_sharing_providers more efficient" 2018-02-27 14:30:23 +00:00
Zuul 93a985d336 Merge "compute: Cleans up allocations after failed resize" 2018-02-27 13:30:02 +00:00
Matt Riedemann 6839630e86 libvirt: mask InjectionInfo.admin_pass
Logging network information and the admin password
for guest instances is not ideal, so let's not do it.

Change-Id: I328ba88b128c6c125e65d850ed7a6e57049dc7e2
Closes-Bug: #1737207
2018-02-27 11:32:29 +00:00