Commit Graph

53957 Commits

Author SHA1 Message Date
Stephen Finucane 7c7798ad52 Remove cells v1 jobs
We're going to start ripping out cells v1. First step is removing the
tests for this soon-to-be-removed feature.

Part of blueprint remove-cells-v1

Change-Id: I2031bf2cc914d134e5ed61156d2cfc621f006e0b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-04-09 17:15:37 +01:00
Zuul d42a007425 Merge "Improve test coverage of nova.privsep.fs, continued." 2019-04-09 12:24:12 +00:00
Zuul e7ac4dc13c Merge "Improve test coverage of nova.privsep.fs." 2019-04-09 12:22:36 +00:00
Zuul 47cd8e0157 Merge "Improve test coverage of nova.privsep.path." 2019-04-09 12:22:29 +00:00
Zuul 47b7d60541 Merge "Remove query_client from resource_tracker" 2019-04-09 05:53:30 +00:00
Zuul 7d6210cfd4 Merge "Add placeholder migrations for Stein backports" 2019-04-09 04:29:31 +00:00
Zuul d18d638d61 Merge "Remove mox in unit/network/test_neutronv2.py (7)" 2019-04-09 03:22:08 +00:00
Zuul fb1fee6772 Merge "trivial: Remove dead resource tracker code" 2019-04-08 18:13:45 +00:00
Zuul 6cf18d508c Merge "trivial: Remove unused constants, functions" 2019-04-08 18:13:37 +00:00
Zuul d6e34e3547 Merge "trivial: Remove dead 'ALIAS' constant" 2019-04-08 18:13:25 +00:00
Zuul 55ac48198f Merge "zvm: Remove dead code" 2019-04-08 18:13:17 +00:00
Zuul 753b143114 Merge "hacking: Fix dodgy check" 2019-04-08 18:13:09 +00:00
Zuul b77abff22d Merge "trivial: Remove dead code" 2019-04-08 18:13:01 +00:00
Stephen Finucane 4aa989f471 Add placeholder migrations for Stein backports
Seeing as these were missed for Rocky, we really ought to get them in
for Stein.

Change-Id: I29401773a0686e7be5d7d1cbb5ec82ffbb16fb4a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-04-08 18:08:40 +01:00
Zuul 6587432640 Merge "Do not log a warning about not using compute monitors" 2019-04-08 09:36:12 +00:00
zhufl 033d00965f Remove query_client from resource_tracker
query_client is not used in resource_tracker, this is to remove it.

Change-Id: If55cfb3975af11661ce238e1cee2bfe37f112878
2019-04-08 14:36:25 +08:00
Zuul a777384697 Merge "libvirt: disconnect volume when encryption fails" 2019-04-06 15:23:05 +00:00
Zuul dbfb6def5b Merge "Don't report 'exiting' when mapping cells" 2019-04-06 11:21:47 +00:00
Zuul 2907e84335 Merge "doc: Capitalize keystone domain name" 2019-04-06 11:21:39 +00:00
Zuul 647eb3911c Merge "Update docs: User token times out during long-running operations" 2019-04-06 11:21:32 +00:00
Zuul 948d63c6dc Merge "Should not skip volume_size check for bdm.image_id == image_ref case" 2019-04-06 11:21:25 +00:00
yenai 79bcb4e21b libvirt: disconnect volume when encryption fails
The compute node has left the attachment information after the
encryption fails. This patch fixes this by ensuring the volume is
disconnected when an exception occurs.

Change-Id: I9d652f182d83a2557ff6ed0b21c69a735c3f9840
Closes-Bug: #1812945
2019-04-05 20:01:52 -04:00
Chris Dent 8ab3300d5d Don't report 'exiting' when mapping cells
When running 'nova-manage simple_cell_setup...' if there are not hosts
to map, but there remaining instances to map, an '..., exiting' message
is produced. This is misleading because "exiting" implies a return of
control to the user. That doesn't happen if there are many instances
left to inspect or map.

This change gets around that by getting rid of the exiting message
in the case where instance mapping can still happen.

Change-Id: I62b20a3676429b5cc756884275138566785b347e
Closes-Bug: #1821737
2019-04-05 23:22:59 +00:00
Zuul 43ef38b53d Merge "Hacking N362: Don't abbrev/alias privsep import" 2019-04-05 18:39:17 +00:00
Zuul fc8c957eea Merge "Added mount fstype based validation of Quobyte mounts" 2019-04-05 17:41:13 +00:00
Zuul 7bf27511ac Merge "api-ref: add more details to confirmResize troubleshooting" 2019-04-05 01:01:39 +00:00
Zuul a84b7e5800 Merge "Delete allocations even if _confirm_resize raises" 2019-04-05 01:01:32 +00:00
Michael Still f389773f52 Improve test coverage of nova.privsep.fs, continued.
Using the new PrivsepFixture, improve test coverage of filesystem
utilities. This finishes off coverage for this file.

Change-Id: I4af57ced168cf285cd3872d20dc2a369b3ac2e14
2019-04-04 20:42:43 +00:00
Michael Still 7b28861444 Improve test coverage of nova.privsep.fs.
Using the new PrivsepFixture, improve test coverage of filesystem
utilities. Part one of several.

Change-Id: If9c863b46fd002ea50c789cad749c24454ba473b
2019-04-04 20:42:43 +00:00
Michael Still 074d3867bc Improve test coverage of nova.privsep.path.
Using the new PrivsepFixture, improve test coverage of the path
utilities. I've tweaked how writefile() works while doing this
because I think its previous behaviour was confusing on reflection.

Change-Id: I875402581d9593474923ee8458caec3dd4423ebd
2019-04-04 20:42:43 +00:00
Michael Still 07627d4d39 Hacking N362: Don't abbrev/alias privsep import
As noted in [1]:

We always import privsep modules like this:

    import nova.privsep.libvirt

Not like this:

    from nova.privsep import libvirt

This is because it makes it obvious at the caller that a priviledged
operation is occuring:

    nova.privsep.libvirt.destroy_root_filesystem()

Not just:

    libvirt.destroy_root_filesystem()

This is especially true when the imported module is called "libvirt",
which is a very common term in the codebase and super hard to grep
for specific uses of.

This commit introduces hacking rule N362 to enforce the above.

Change-Id: I9b6aefa015acbf28e49a9ff1713a8bb544586579
Co-Authored-By: Eric Fried <openstack@fried.cc>
2019-04-04 20:42:43 +00:00
Matt Riedemann 8795f591d5 Do not log a warning about not using compute monitors
The compute_monitors configuration option is empty by
default, however, on nova-compute startup we get a warning
logged saying:

  Excluding nova.compute.monitors.cpu monitor virt_driver. \
  Not in the list of enabled monitors (CONF.compute_monitors).

This is unnecessary noise in the logs when nova-compute is
not configured to use monitors, so this change avoids the warning
log message in that case.

The compute_monitors configuration option help text is also
updated to (1) fix formatting and (2) remove the mention of the
numa_mem_bw monitor which never made it into nova (see
blueprint memory-bw).

Change-Id: I5bd204e0017f6f795e3cf13b34b75124ee23aa78
Closes-Bug: #1823207
2019-04-04 14:32:53 -04:00
Matt Riedemann 8856009445 Add docs on what not to include in notifications
Based on bug 1823104 it's clear we should have some
explicit wording in the notification reference docs
about what not to include in versioned notification
payloads, so this change attempts to start that with
the most obvious thing - don't expose access credentials
to the nova deployment.

This also adds a reminder to think about what is being
added / mirrored from internal objects and determine if
consumers really need it and if they aren't asking, opt
to not including it until requested.

Change-Id: I326aa39d963091282a5d0b70ba222abfe8ccfdac
Related-Bug: #1823104
2019-04-04 10:20:32 -04:00
Matt Riedemann 3301449e73 Remove CellMappingPayload database_connection and transport_url fields
Change I019e88fabd1d386c0d6395a7b1969315873485fd in Stein, which
is not yet officially released, exposes the unencrypted
database_connection URL and MQ transport_url to a CellMapping in
the select_destinations versioned notification CellMappingPayload.

While notifications are not meant to be consumed by end users of
the cloud but only internal services of the deployment, it still
seems like a bad idea to give the keys to the nova cell DB and MQ
to an external-to-nova service like ceilometer.

This change removes the fields from the CellMappingPayload and
bumps the major version to 2.0 to signal the change to consumers,
although I don't expect anything is consuming this yet but we should
follow standard versioning procedure anyway.

Note that notification consumers do not request a specific payload
version nor do they get a schema to perform their own backporting,
they just get what they get, so after this there should be no worry
about needing to support the 1.0 format for this payload.

Change-Id: Ib5edea32d15db01000e6730aebceaf119daf8c5c
Closes-Bug: #1823104
2019-04-04 09:59:12 -04:00
Zuul 6ebb2c4cae Merge "Remove mox in unit/network/test_neutronv2.py (6)" 2019-04-04 00:48:04 +00:00
Zuul 631f5faaaa Merge "api-ref: fix description of os-server-external-events 'events' param" 2019-04-04 00:47:55 +00:00
Zuul 1351d02583 Merge "api-ref: document ordering for instance actions and events" 2019-04-04 00:47:47 +00:00
Zuul 04e04049a8 Merge "Add functional test for the JsonFilter" 2019-04-04 00:47:39 +00:00
Zuul bcae3e2b82 Merge "Drop migrate_keypairs_to_api_db data migration" 2019-04-04 00:47:32 +00:00
Zuul 9d10753079 Merge "Don't warn on network-vif-unplugged event during live migration" 2019-04-04 00:32:53 +00:00
Matt Riedemann 214656eff2 api-ref: fix description of os-server-external-events 'events' param
The description on the 'events' parameter for the
POST /os-server-external-events API did not make sense,
so this re-words it.

Change-Id: Iaec80e03a8ab0cd1b34126701bd0754953394e42
2019-04-03 18:08:41 -04:00
Matt Riedemann 3dbb0c4c57 api-ref: document ordering for instance actions and events
Whenever I use the os-instance-actions API I have to look at
the DB API source code to figure out the sort order of the
resulting instanceActions and each action's events, which
is desc(created_at) in both cases (and desc(id) but that should
not matter here since the id is not exposed in the API).

This change mentions the resulting sort order of those fields
in the API reference so I can stop looking at source code.

[1] https://github.com/openstack/nova/blob/e7ae6c65c/nova/db/sqlalchemy/api.py#L5149
[2] https://github.com/openstack/nova/blob/e7ae6c65c/nova/db/sqlalchemy/api.py#L5289

Change-Id: Ib5758bc21296e8b6c041198661c147b8e99d57e5
2019-04-03 18:03:28 -04:00
Matt Riedemann cec1808050 Drop migrate_keypairs_to_api_db data migration
This was added in Newton:

  I97b72ae3e7e8ea3d6b596870d8da3aaa689fd6b5

And was meant to migrate keypairs from the cell
(nova) DB to the API DB. Before that though, the
keypairs per instance would be migrated to the
instance_extra table in the cell DB. The migration
to instance_extra was dropped in Queens with change:

  Ie83e7bd807c2c79e5cbe1337292c2d1989d4ac03

As the commit message on ^ mentions, the 345 cell
DB schema migration required that the cell DB keypairs
table was empty before you could upgrade to Ocata.

The migrate_keypairs_to_api_db routine only migrates
any keypairs to the API DB if there are entries in the
keypairs table in the cell DB, but because of that blocker
migration in Ocata that cannot be the case anymore, so
really migrate_keypairs_to_api_db is just wasting time
querying the database during the online_data_migrations
routine without it actually migrating anything, so we
should just remove it.

Change-Id: Ie56bc411880c6d1c04599cf9521e12e8b4878e1e
Closes-Bug: #1822613
2019-04-03 11:42:48 -04:00
Sean Mooney e7ae6c65cd Libvirt: gracefully handle non-nic VFs
As part of adding support for bandwidth based scheduling
I038867c4094d79ae4a20615ab9c9f9e38fcc2e0a introduced
automatic discovery of parent netdev names for PCIe
virtual functions.

Nova's PCI passthrough support was originally developed for
Intel QAT devices and other generic PCI devices. Later support
for Neutron based SR-IOV NIC was added.

The PCI-SIG SR-IOV specification while most often used by NIC
vendors to virtualise a NIC in hardware was designed for devices
of any PCIe class. Support for Intel's QAT device and other
accelerators like AMD's SRIOV based vGPU have therefore been
regressed by the introduction of the new parent_ifname lookup code.

This change simply catches the exception that would be raised
when pci_utils.get_ifname_by_pci_address is called on generic
VFs allowing a graceful fallback to the previous behaviour.

Change-Id: Ib3811f828246311d90b0e3ba71c162c03fb8fe5a
Closes-Bug: #1821938
2019-04-03 13:50:24 +00:00
Stephen Finucane 754847ed27 trivial: Remove dead resource tracker code
Change-Id: I7ad261e60517858cec02f20df2ff0db2f0af0c62
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-04-03 13:37:34 +00:00
Stephen Finucane ec09c06c5a trivial: Remove unused constants, functions
Change-Id: I5943cce6434ece0c6152caf8e097486064296032
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-04-03 13:37:29 +00:00
Zuul 357da989c1 Merge "Remove mox in unit/network/test_neutronv2.py (5)" 2019-04-03 12:09:57 +00:00
Zuul 809eb48178 Merge "Remove mox in unit/network/test_neutronv2.py (4)" 2019-04-03 12:09:48 +00:00
Zuul 1b94777831 Merge "Style corrections for privsep usage." 2019-04-03 12:09:38 +00:00
Zuul 968aab8e12 Merge "Docs: emulator threads: clarify expected behavior" 2019-04-03 11:47:18 +00:00