4299 Commits

Author SHA1 Message Date
Kashyap Chamarthy
c590843974 Allow 'bochs' as a display device option
The 'bochs' display device is a recommended[1] safe option for UEFI
guests.  This is supported in libvirt from version 5.6.0; Nova's current
MIN_LIBVIRT_VERSION (6.0.0) satisfies this requirement.

Partially quoting the "bochs display device" section from a post written
by a QEMU graphics maintainer[1]:

    [...] Main advantage over standard VGA is that this device is alot
    simpler.  The code size and complexity needed to emulate this device
    is an order of magnitude smaller, resulting in a reduced attack
    surface. Another nice feature is that you can place this device in a
    PCI Express slot.

    For UEFI guests it is safe to use the bochs display device instead
    of the standard VGA device. The firmware will setup a linear
    framebuffer as GOP anyway and never use any legacy VGA features.

    For BIOS guests this device might be useable as well, depending on
    whenever they depend on direct VGA hardware access or not. There is
    a vgabios which supports text rendering on a linear framebuffer, so
    software which uses the vgabios services for text output will
    continue to work. Linux bootloaders typically fall into this
    category. The linux text mode console (vgacon) uses direct hardware
    access and does not work. The framebuffer console (fbcon running on
    vesafb or bochs-drm) works.

[1] https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/

Implements: blueprint add-bochs-display-device

Change-Id: Id194028f5d2cbaac1c5e699b71fd9751f87f5da5
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
2021-09-02 17:46:22 +01:00
melanie witt
fc77ce191f Add --sleep option for archive_deleted_rows --until-complete
Currently, when 'nova-manage db archive_deleted_rows' is run with
the --until-complete option, the process will archive rows in batches
in a tight loop, which can cause problems in busy environments where
the aggressive archiving interferes with other requests trying to write
to the database.

This adds an option for users to specify an amount of time in seconds
to sleep between batches of rows while archiving with --until-complete,
allowing the process to be throttled.

Closes-Bug: #1912579

Change-Id: I638b2fa78b81919373e607458e6f68a7983a79aa
2021-09-02 13:55:46 +02:00
Balazs Gibizer
44309c419f Support interface attach / detach with new resource request format
The interface attach and detach logic is now fully adapted to the new
extended resource request format, and supports more than one request
group in a single port.

blueprint: qos-minimum-guaranteed-packet-rate
Change-Id: I73e6acf5adfffa9203efa3374671ec18f4ea79eb
2021-09-01 15:51:47 +02:00
Zuul
e81211318a Merge "Support move ops with extended resource request" 2021-08-31 21:38:24 +00:00
Zuul
9abcb3825a Merge "Support boot with extended resource request" 2021-08-31 21:38:15 +00:00
Balazs Gibizer
191bdf2069 Support move ops with extended resource request
Nova re-generates the resource request of an instance for each server
move operation (migrate, resize, evacuate, live-migrate, unshelve) to
find (or validate) a target host for the instance move. This patch
extends the this logic to support the extended resource request from
neutron.

As the changes in the neutron interface code is called from nova-compute
service during the port binding the compute service version is bumped.
And a check is added to the compute-api to reject the move operations
with ports having extended resource request if there are old computes
in the cluster.

blueprint: qos-minimum-guaranteed-packet-rate
Change-Id: Ibcf703e254e720b9a6de17527325758676628d48
2021-08-27 17:59:18 +02:00
Balazs Gibizer
c3886c3ca7 Support boot with extended resource request
This adds the final missing pieces to support creating servers with
ports having extended resource request. As the changes in the neutron
interface code is called from nova-compute service during the port
binding the compute service version is bumped. And a check is added to
the compute-api to reject such server create requests if there are old
computes in the cluster.

Note that some of the negative and SRIOV related interface attach
tests are also started to pass as they are not dependent on any of the
interface attach specific implementation. Still interface attach is
broken here as the failing of the positive tests show.

blueprint: qos-minimum-guaranteed-packet-rate

Change-Id: I9060cc9cb9e0d5de641ade78c5fd7e1cc77ade46
2021-08-27 15:51:12 +02:00
Balazs Gibizer
f6e8c512fb Bump min placement microversion to 1.36
To implement the usage of same_subtree query parameter in the
allocation candidate request first the minimum requires placement
microversion needs to be bumped from 1.35 to 1.36. This patch makes such
bump and update the related nova upgrade check. Later patches will
modify the query generation to include the same_subtree param to the
request.

Change-Id: I5bfec9b9ec49e60c454d71f6fc645038504ef9ef
blueprint: qos-minimum-guaranteed-packet-rate
2021-08-21 10:00:51 +02:00
Balazs Gibizer
e357ad3c23 Reject server create with extended resource req
To prepare for the unlikely event that Neutron merges and an operator
enables the port-resource-request-groups neutron API extension before
nova adds support for it, this patch rejects server creation if such
extension is enabled in Neutron. Enabling that extension has zero
benefits without nova support hence the harsh but simple rejection.

A subsequent patch will reject server lifecycle operations in a more
sophisticated way and as soon as we support some operations, like
boot, the deployer might rightfully choose to enable the Neutron
extension.

Change-Id: I2c55d9da13a570efbc1c862116cea31aaa6aa02e
blueprint: qos-minimum-guaranteed-packet-rate
2021-08-21 09:49:54 +02:00
Zuul
033af94179 Merge "Deprecate filters that have been replaced by placement filters" 2021-08-21 02:51:28 +00:00
Zuul
51f3d6c60c Merge "Rename vgpu options to mdev" 2021-08-20 22:57:10 +00:00
Zuul
00454f6279 Merge "scheduler: Merge 'FilterScheduler' into base class" 2021-08-20 17:17:37 +00:00
Zuul
eedbff3859 Merge "api: Improve extra spec validator help texts" 2021-08-20 16:17:26 +00:00
Zuul
560fbf069f Merge "docs: Explicitly state lack of support for node renaming" 2021-08-20 16:17:10 +00:00
Zuul
cca1bb1bae Merge "Block servers with vGPU and device profile in heal_allocations" 2021-08-18 14:43:06 +00:00
Stephen Finucane
a7584ec1a5 docs: Add documentation on database migrations
Alembic does lots of new things. Provide docs for how to use this. We
also improve upgrade docs slightly, removing references to ancient
reviews that are no longer really helpful as well as calling out our N
-> N+1 constraint.

Change-Id: I3760b82ce3bd71aa0a760d7137d69dfa3f29dc1d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-08-17 13:49:18 +01:00
Stephen Finucane
905c9723e9 db: Integrate alembic
This looks more complicated than it is, but it's really quite simple.
Essentially we have to deal with two possible configurations:

- For existing deployments, the DB sync operation should apply any
  outstanding sqlalchemy-migrate-based migrations, dummy apply the
  initial alembic migration, and then apply any additional alembic-based
  migrations requested (or any available, if no version is specified).

- For new deployments, the DB sync operation should apply the initial
  alembic migration and any additional alembic-based migrations
  requested (or any available, if no version is specified). No
  sqlalchemy-migrate-based migrations will ever be applied.

While we continue to allow users to request a specific database
migration version to upgrade to, we *do not* allow them to request a
sqlalchemy-migrate-based migration version. There's no good reason to do
this - the deployment won't run with an out-of-date DB schema (something
that's also true of the alembic migration, fwiw) - and we want to get
people off of sqlalchemy-migrate as fast as possible. A change in a
future release can remove the sqlalchemy-migrate-based migrations once
we're sure that they'll have upgraded to a release including all of the
sqlalchemy-migrated-based migrations (so Wallaby).

Tests are modified to validate the sanity of these operations. They're
mostly trivial changes, but we do need to do some funky things to ensure
that (a) we don't use logger configuration from 'alembic.ini' that will
mess with our existing logger configuration and (b) we re-use connection
objects as necessary to allow us to run tests against in-memory
databases, where a different connection would actually mean a different
database. We also can't rely on 'WalkVersionsMixin' from oslo.db since
that only supports sqlalchemy-migrate [1]. We instead must re-invent the
wheel here somewhat.

[1] https://github.com/openstack/oslo.db/blob/10.0.0/oslo_db/sqlalchemy/test_migrations.py#L42-L44

Change-Id: I850af601f81bd5d2ecc029682ae10d3a07c936ce
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-08-09 15:34:40 +01:00
Stephen Finucane
bf8b5fc7d0 db: Move remaining 'nova.db.sqlalchemy' modules
The two remaining modules, 'api_models' and 'api_migrations', are
moved to the new 'nova.db.api' module.

Change-Id: I138670fe36b07546db5518f78c657197780c5040
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-08-09 15:34:40 +01:00
Zuul
b218f167cc Merge "db: Move main DB migrations" 2021-08-06 16:57:04 +00:00
Balazs Gibizer
59c2262ca5 Block servers with vGPU and device profile in heal_allocations
Nested allocations are only partially supported in nova-manage placement
heal_allocations CLI. This patch documents the missing support and
blocks healing instances with VGPU or Cyborg device profile request in
the embedded flavor. Blocking is needed as if --forced is used with such
instances then the tool could recreate an allocation ignoring some of
these resources.

Change-Id: I89ac90d2ea8bc268940869dbbc90352bfad5c0de
Related-Bug: bug/1939020
2021-08-06 15:58:39 +02:00
Sylvain Bauza
ff4d0d002a Rename vgpu options to mdev
As a prerequisite for blueprint generic-mdevs we need to rename the
existing enabled_vgpu_types options and dynamically generated groups
into enabled_mdev_types.
There is no upgrade impact for existing users, as the original
options are still accepted.

NOTE(sbauza): As we have a lot of methods and objects named gpu-ish
let's just change what we need here and provide followups for
fixing internal tech debt later.

Change-Id: Idba094f6366a24965804b88da0bc1b9754549c99
Partially-Implements: blueprint generic-mdevs
2021-08-03 16:54:54 +02:00
Zuul
b5aa1de0ab Merge "docs: Add libvirt misc doc" 2021-07-27 18:24:31 +00:00
Zuul
fa60c0aa45 Merge "docs: Change formatting of hypervisor config guides" 2021-07-27 18:24:22 +00:00
Zuul
db489c37ed Merge "docs: Fold in MDS security flaw doc" 2021-07-27 18:24:12 +00:00
Stephen Finucane
d4f9b03c5c api: Improve extra spec validator help texts
Correct a variety of gaps and other issues seen while improving the
flavor docs.

Change-Id: I8d68016cecb0269a5f9af88b0a08578f85403e23
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-07-27 16:55:57 +01:00
Zuul
3566459e51 Merge "docs: Clarify host-model, host-passthrough differences" 2021-07-22 15:36:43 +00:00
Stephen Finucane
d88fe2895b docs: Replace 'nova boot' with 'openstack server create'
Replace references to novaclient with OSC in the boot from volume guide.

This is essentially a revert of commit aa3964118, which was a revert of
an earlier attempt at doing this that fell down because it didn't
reflect the changes in CLI parameters between the different tools.

Change-Id: Ic99440dd618243517f64506e3da88885fc2c44c9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-07-07 13:29:07 +00:00
Stephen Finucane
bcf225daf4 db: Move main DB migrations
We place these in a 'legacy_migrations' directory, as we will soon be
adding alembic-based migrations in a 'migration' directory.

Change-Id: Ib927e4c48f59a467a913875111ffbf64ffe0de90
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-07-05 11:05:04 +01:00
Zuul
ee3b492506 Merge "Improve policy doc for supported scope info" 2021-06-29 17:49:53 +00:00
Zuul
b280ab292b Merge "Fix typos in minimum version policy docs" 2021-06-29 17:14:27 +00:00
Stephen Finucane
e0534cc289 scheduler: Merge 'FilterScheduler' into base class
There are no longer any custom filters. We don't need the abstract base
class. Merge the code in and give it a more useful 'SchedulerDriver'
name.

Change-Id: Id08dafa72d617ca85e66d50b3c91045e0e8723d0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-06-29 12:24:41 +01:00
ericxiett
c31d3f96b1 Fix error '404 Not Found'
The link of `TLS everywhere` should be 'https://docs.openstack.org/
project-deploy-guide/tripleo-docs/latest/features/tls-everywhere.html'.

Closes-Bug: #1933062
Change-Id: I468b82edeb899b0a780f8b545ad23ee0428a93ea
2021-06-21 15:04:43 +08:00
Zuul
97f1741352 Merge "Add --task-log option to nova-manage db archive_deleted_rows" 2021-06-18 11:54:56 +00:00
melanie witt
bc71331bca Add --task-log option to nova-manage db archive_deleted_rows
The task_log table contains instance usage audit records if
nova-compute has been configured with [DEFAULT]instance_usage_audit =
True. This will be the case if OpenStack Telemetry is being used in the
deployment, as the option causes nova to generate audit information
that Telemetry then retrieves from the server usage audit log API [1].

Historically, there has been no way to delete task_log table records
other than manual database modification. Because of this, task_log
records could pile up over time and operators are forced to perform
manual steps to periodically truncate the table.

This adds a --task-log option to the 'nova-manage db
archive_deleted_rows' CLI to also archive task_log records while
archiving the database. --task-log works in conjunction with --before
if operators desire archving only records that are older than <date>.
The 'updated_at' field is used by --task-log --before <date> to
determine the age of a task_log record for archival.

Closes-Bug: #1877189

[1] https://docs.openstack.org/api-ref/compute/#server-usage-audit-log-os-instance-usage-audit-log

Change-Id: Ibed67854a693c930effd4dba7aca6cd03b65bd92
2021-06-17 01:57:12 +00:00
Zuul
245433b826 Merge "docs: Add releases to libvirt distro support matrix" 2021-06-11 14:40:22 +00:00
Pierre Riteau
31491e5bc3 Fix typos in minimum version policy docs
Change-Id: If0708fc3594f0e59954976831168c93d66514dd2
2021-06-11 16:36:48 +02:00
Artom Lifshitz
7a0b2d3482 docs: Explicitly state lack of support for node renaming
Nova does not support renaming a node once it has been deployed.
Previously, this was not mentioned anywhere in our docs. This patches
adds a warning to that effect to the installation guide.

Change-Id: I0f34c89855069119974d75d31833b974ba705306
2021-06-09 13:39:43 -04:00
Zuul
14c5f979a2 Merge "docs: Address TODO" 2021-06-09 00:24:14 +00:00
Ghanshyam Mann
0b63f9effe Improve policy doc for supported scope info
Nova does not support all the scope provided by
keystone. It is better to mention the supported
scope and default roles.

Also adding a table to map the legacy rules with new
rules.

Change-Id: If7f025b3eaeda2df0cb1efd567b8fc60e274d09c
2021-06-03 09:46:18 -05:00
Sean Mooney
7c7a2a142d Deprecate filters that have been replaced by placement filters
This change deprecates the AZ filters which is no longer required.

This also enable the use of placement for AZ enforcement by default and
deprecates the config option for removal.

Change-Id: I92b0386432444fc8bdf852de4bdb6cebb370a8ca
2021-06-01 15:11:50 +01:00
Stephen Finucane
5cf06bf33d docs: Remove duplicate ToC entry
Change-Id: Idf9c2cb27b3421174b686ca97233281ea7168970
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-05-31 15:07:41 +01:00
Balazs Gibizer
fc3838a9b3 Change nova doc after Freenode -> OFTC move
Change-Id: I65e5ac1709d1ddbbf7a1d6b27070e676dedea186
2021-05-31 10:43:49 +02:00
Stephen Finucane
472db13aaf docs: Address TODO
We now have good documentation on the PCI NUMA affinity policies
(thanks, artom!) so we can close out this TODO. Hurrah!

Change-Id: I4e6402bd192ea0d2efb26b52a7ceb65d924ec928
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-05-25 16:45:51 +01:00
Lee Yarwood
d0b8028b51 docs: Add releases to libvirt distro support matrix
This change adds Fedora 34, RHEL 8.4, SUSE Leap 15.3 and Ubuntu 21.04.

Change-Id: Ifb5588126ac571fe7825f551d3a3dae63cdf6f7a
2021-05-20 17:33:35 +01:00
Balazs Gibizer
b28579a7b0 Describe the use of Review-Priority label
Depends-On: https://review.opendev.org/c/openstack/project-config/+/787523
Change-Id: Icc5133372a41cf611ea4784e9616fcadddbc2c47
2021-05-20 13:23:38 +02:00
Zuul
48b5bf94a3 Merge "Remove references to 'sys.version_info'" 2021-05-03 14:21:56 +00:00
Balazs Gibizer
0b05b838a4 Fix bond_mode enum 802.1ad -> 802.3ad
This seems to me a clerical error made a long time ago in the spec [1].
The 802.1ad values does not seems to be a valid bonding mode but 802.3ad
does.

This patch fixes the schema in the nova doc. No test are changed as nova
does not generate this part of the network metadata.

[1] https://specs.openstack.org/openstack/nova-specs/specs/kilo/approved/metadata-service-network-info.html#rest-api-impact

Change-Id: I0055d13b055e34372a8186008ba75be68aa2edf9
Closes-Bug: #1925388
2021-04-29 17:42:59 +02:00
Zuul
df3655cfdc Merge "docs: Correct typos in 'nova-manage db' docs" 2021-04-22 11:45:31 +00:00
Zuul
118e269fe1 Merge "docs: Follow up for SEV doc" 2021-04-22 11:40:55 +00:00
Zuul
a74bced0eb Merge "docs: Document location of nova.conf files" 2021-04-21 18:37:21 +00:00