Commit Graph

50072 Commits

Author SHA1 Message Date
Stephen Finucane ddb2b028f1 crypto: Remove unused functions
These top-level functions were not called from anywhere but tests.

- fetch_ca
- ensure_ca_filesystem
- fetch_crl
- decrypt_text
- revoke_certs_by_user
- revoke_certs_by_project
- revoke_certs_by_user_and_project
- generate_x509_cert
- generate_vpn_files

These other functions are used by the above and are no longer used
anywhere.

- ca_folder
- ca_path
- key_path
- crl_path
- revoke_cert
- _project_cert_subject
- _user_cert_subject
- _ensure_project_folder
- sign_csr
- _sign_csr

Tests for these are removed as are a number of scripts found in
'nova/CA', which were only used by the aforementioned functions.

Change-Id: Ie1dadc6bf935f777e0cd0c54a0a21b79545714c5
2018-03-08 10:24:40 +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
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
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
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
Takashi NATSUME 5133a543b9 Remove unused LOG variables
TrivialFix
Change-Id: I84f80aa75fb455039e5b56ae4d49a5f77db9097a
2018-02-27 11:19:48 +00:00
Zuul cbd67030d0 Merge "Clarify update_provider_tree docstring" 2018-02-26 21:00:23 +00:00
Zuul af9c4298b5 Merge "Clarify wording in listing instance actions for deleted instances" 2018-02-26 21:00:00 +00:00
Matt Riedemann 8e2000efc8 Clarify wording in listing instance actions for deleted instances
The ability to list instance actions for deleted servers was
added in the 2.21 microversion, so we should update the wording
to make that clear.

Change-Id: Ibf05d5bd2c70aa579bb2a688d4d5fa63278176d2
2018-02-26 10:31:52 -05:00
esberglu b5f38fb40a Add check for redundant import aliases
This adds a pep8 function that will check for redundant import aliases.
Any imports of the forms below will not be allowed.

from x import y as y
import x as x
import x.y as y

Change-Id: Iff90f0172d97bd1d49d54c811a70c8af11776da4
2018-02-26 14:32:22 +00:00
Eric Fried 012f7b0f08 Make _get_sharing_providers more efficient
Placement microversion 1.18 added support for filtering GET
/resource_providers by traits, allowing us to improve the algorithm in
_get_sharing_providers to a single call instead of 1 + (1 per provider
in the aggregate).

Change-Id: I42d4da1bc5b04436a3e160357bfc3e7b8802c7f3
2018-02-26 14:08:23 +00:00
Zuul e3d5a083e3 Merge "rp: GET /resource_providers?required=<traits>" 2018-02-26 13:24:13 +00:00
Zuul 4779712a77 Merge "Update noVNC deployment docs to mention non-US keymap fix in 1.0.0" 2018-02-26 12:31:17 +00:00
Zuul 76ed3ce468 Merge "Drop compute RPC 4.x compatibility" 2018-02-26 11:12:46 +00:00