Commit Graph

2351 Commits

Author SHA1 Message Date
Zuul 4f69d8e6c7 Merge "Add JSON schema and test for network_data.json" 2020-02-18 18:57:16 +00:00
Ilya Etingof 69ee625a66 Add JSON schema and test for network_data.json
Added JSON schema defining `network_data.json` contents and
beefed up the MetadataTest functional test cases to use a
real instance instead of a database shell. This way the
tests see real data in the metadata service like a real
network_data.json.

Besides internal Nova consumption, this schema might be
helpful to other tools (such as ironic or Glean) to
validate human-generated `network_data.json` prior to
using it.

Co-Authored-By: Balazs Gibizer <balazs.gibizer@est.tech>
Change-Id: Ie5a5a1fc81c7c2d3f61b72d19de464cfc9dab5ec
2020-02-17 15:35:24 +01:00
Stephen Finucane 4bdecee385 docs: Fix the monkeypatching of blockdiag
blockdiag has a longstanding bug whereby it tries to access an attribute
on an 'io.BufferedReader' that doesn't exist. We had previously fixed
this in change Ibd32d30aacae65702d0ccbdb8a02b1667ec4e8ee, which undid
the damage blockdiag was doing. However, this worked because the monkey
patching blockdiag does happens when the 'blockdiag.utils.compat' module
is loaded [1], which was happening implicitly with our import of
'blockdiag.imagedraw.textfolder' [2]. However, that module no longer
imports the 'compat' [3] module so this doesn't work. Fix the issue by
just importing the 'compat' module manually, triggering the monkey
patching...which we can then undo.

[1] https://github.com/blockdiag/blockdiag/blob/2.0.0/src/blockdiag/utils/compat.py#L19-L26
[2] https://github.com/blockdiag/blockdiag/blob/1.5.4/src/blockdiag/imagedraw/textfolder.py#L18
[3] https://github.com/blockdiag/blockdiag/tree/2.0.0/src/blockdiag/imagedraw/textfolder.py

Change-Id: Idacfff98842fde38fb39791090f2da3310b441b5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-01-31 17:52:54 +00:00
Zuul b8f4e46939 Merge "zuul: Remove unnecessary 'USE_PYTHON3'" 2020-01-30 17:09:07 +00:00
Zuul 9fa3600fca Merge "doc: define boot from volume in the glossary" 2020-01-29 03:52:50 +00:00
Zuul 575d988a2c Merge "Fix typos for update_available_resource reference" 2020-01-25 19:21:44 +00:00
Riccardo Pittau f0bc7874a8 Fix typos for update_available_resource reference
Fixing a couple of typos that wrongly refers to
update_available_resources()
insted of update_available_resource()

Change-Id: Iaf7828e9cfb73ac87018d78180d16aae91d838f3
2020-01-16 10:31:06 +01:00
Zuul 7c54ec6b81 Merge "Print help if nova-manage subcommand is not specified" 2020-01-15 01:55:37 +00:00
Zuul 67d9b5114e Merge "Fix typos in nova doc" 2020-01-10 23:27:11 +00:00
Zuul 3d3d6d5250 Merge "Use Placement 1.35 (root_required)" 2020-01-10 02:44:45 +00:00
zhufl ea172ef85f Fix typos in nova doc
This is to fix the following typos:
  regadless
  users's
  possile
  caculated

Change-Id: If47adefa59f01b7f2ebcee5b7e07e0260df113e4
2020-01-09 15:49:49 +08:00
Matt Riedemann 33c7996624 doc: define boot from volume in the glossary
Define it and also link to the term in a few different docs.

Change-Id: I6333deb2f6e85eba3c92128dab4e4b4d35355603
2020-01-08 12:37:05 -05:00
Zuul f25e5d0820 Merge "Update Testing NUMA documentation" 2020-01-08 16:56:01 +00:00
Victor Morales 4b6b755d86 Update Testing NUMA documentation
The document which contains the steps to test different NUMA
setups was using legacy instructions. This change pretends to update
those instructions to improve the readability.

Change-Id: Id8bf96f035528b15a51c802f06e07422b9f36736
2020-01-08 08:11:50 -08:00
Zuul 1fed6bd934 Merge "Remove 'nova-xvpvncproxy'" 2020-01-08 06:27:03 +00:00
Zuul d4a0f69e61 Merge "nova-net: Remove firewall support (pt. 2)" 2020-01-08 01:55:20 +00:00
Eric Fried bcc893a2b0 Use Placement 1.35 (root_required)
Placement microversion 1.35 gives us the root_required queryparam to GET
/allocation_candidates, allowing us to filter out candidates where the
*root* provider has/lacks certain traits, independent of traits
specified in any of the individual request groups.

Use it.

And add affordance for specifying such traits to the RequestSpec.

Which allows us to fix up the couple of request filters that were
hacking traits into the RequestSpec.flavor.

Change-Id: I44f02044ce178e84c23d178e5a23a3aa1208e502
2020-01-07 16:46:56 -06:00
Zuul 0e81260415 Merge "FUP for docs nits in cross-cell-resize series" 2020-01-07 16:29:48 +00:00
Zuul 2c6388e3cd Merge "docs: Add note about an image signature validation limitation when using rbd" 2020-01-07 00:51:29 +00:00
Stephen Finucane 30141e6b52 nova-net: Remove firewall support (pt. 2)
Firewall support is not needed with neutron, which supports both
security groups for per-port filtering and FWaaS for per-network
filtering. Remove both the generic firewalls and the hypervisor-specific
implementations.

This change focuses on removing the firewall-related API calls from the
various virt drivers. The firewall drivers themselves are removed
separately.

Change-Id: I5a9e5532c46a5f7064441ae644125d21efe5fda1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-01-06 12:46:30 +00:00
zhufl b608d6bfb4 Fix duplicated words issue like "during during boot time"
This is to fix the duplicated words issue like
"if it was specified during during boot time".

Change-Id: I0ffedb8c40399a4b0ecd83b142bdeaf556d1568f
2020-01-06 14:19:03 +08:00
Matt Riedemann 29100f9b5a FUP for docs nits in cross-cell-resize series
Addresses review comments from:

* https://review.opendev.org/#/c/638269/63/doc/source/admin/configuration/resize.rst
* https://review.opendev.org/#/c/696212/6/doc/source/admin/configuration/cross-cell-resize.rst

Also updates contributor/resize-and-cold-migrate since that is relatively
new and biased toward same-cell resize and cold migrate. However, I chose
to link the same-cell resize glossary term to that contributor doc rather
than admin/configuration/resize because the admin doc is woefully bare.

Part of blueprint cross-cell-resize

Change-Id: I93b051252e34c8604cebea617c34e9299ac508d4
2019-12-23 10:10:57 -05:00
Matt Riedemann 74e76b1a6b Add cross-cell resize tests for _poll_unconfirmed_resizes
This adds two tests and updates the cross-cell resize docs to
show that _poll_unconfirmed_resizes can work if the cells are
able to "up-call" to the API DB to confirm the resize. Since
lots of deployments still enable up-calls we don't explicitly
block _poll_unconfirmed_resizes from processing cross-cell
migrations. The other test shows that _poll_unconfirmed_resizes
fails if up-calls are disabled.

Part of blueprint cross-cell-resize

Change-Id: I39e8159f3e734a1219e1a44434d6360572620424
2019-12-23 10:10:57 -05:00
Matt Riedemann 6aafb29820 Add sequence diagrams for cross-cell-resize
This tries to strike a balance between giving a useful high level
flow without injecting too much complex detail in each diagram.

For the more complicated resize diagram, I have used labels to
try and make clear which conductor task is performing an action.

For the less complicated confirm and revert diagrams, I add a
separator to show where the conductor task is orchestrating the
calls and provide a bit more detail into what each task is doing
since the calls to computes are minimal in those cases.

Part of blueprint cross-cell-resize

Change-Id: I27c549901a3359f106ba5d77aa6559397ee12a5d
2019-12-23 10:10:57 -05:00
Matt Riedemann aa74ac60e2 Flesh out docs for cross-cell resize/cold migrate
This gives most of the high level information. I'm sure there
are more troubleshooting things we can add but those could come
later as they crop up.

The sequence diagram(s) will come in a separate change.

Part of blueprint cross-cell-resize

Change-Id: I13f07a2d45bf5b8584adc8aa079bae640cb5c470
2019-12-23 10:10:57 -05:00
Matt Riedemann 6ebee92445 Add cross-cell resize policy rule and enable in API
This adds the "compute:servers:resize:cross_cell" policy
rule which is now used in the API to determine if a resize
or cold migrate operation can be performed across cells.

The check in the API is based on:

- The policy check passing for the request.
- The minimum nova-compute service version being high
  enough across all cells to perform a cross-cell resize.

If either of those conditions fail a traditional same-cell
resize will be performed.

A docs stub is added here and will be fleshed out in an
upcoming patch.

Implements blueprint cross-cell-resize

Change-Id: Ie8a0f79a3b16e02b7a34a1b81f547013a3d88996
2019-12-23 10:10:57 -05:00
Stephen Finucane 02eb9cffe6 Remove 'nova-xvpvncproxy'
This legacy service is no longer used and was deprecated during the
Stein cycle [1]. It's time to say adios and remove them in their
entirety. This is pretty straightforward, with the sole exception of
schema for the 'remote-consoles' API, which has to continue supporting
requests for type 'xvpvnc' even if we can't fulfil those requests now.

[1] https://review.opendev.org/#/c/610076/

Part of blueprint remove-xvpvncproxy

Depends-On: https://review.opendev.org/695853
Change-Id: I2f7f2379d0cd54e4d0a91008ddb44858cfc5a4cf
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-12-23 14:20:28 +00:00
Zuul a24c7848cc Merge "Add CrossCellWeigher" 2019-12-22 21:26:28 +00:00
Matt Riedemann 51b0d4ca58 Print help if nova-manage subcommand is not specified
If a nova-manage command is executed without the -h option
or a subcommand the user gets an ugly traceback. This is
easily recreated:

  $ tox -e venv -- nova-manage db

Make the action argument required, so we get a helpful error message
instead.

  $ nova-manage db
  usage: nova-manage db [-h]
                      {archive_deleted_rows,ironic_flavor_migration,
                       null_instance_uuid_scan,online_data_migrations,
                       purge,sync,version}
                      ...
  nova-manage db: error: the following arguments are required: action

Note that unit tests appear to be impossible for this, since doing so
attempts to initialize an oslo.config 'CONF' singleton and this is
something we've already done in 'nova.test' and can't do again.

Change-Id: I24d03eed3aa3b882c49916938f4c25d76fd4e831
Closes-Bug: #1837199
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
2019-12-20 11:40:02 +00:00
Lee Yarwood 0d750d62b0 docs: Add note about an image signature validation limitation when using rbd
Document a small wrinkle with the image signature validation feature
when using the Libvirt virt driver, rbd imagebackend and RAW image
format due to the validation being triggered during image download.

Change-Id: Ic67c4d251c17e5e93045eb50ff99580e2cf66c76
2019-12-20 10:48:54 +00:00
Zuul ac2cec2d4d Merge "Add troubleshooting doc about rebuilding the placement db" 2019-12-18 17:44:22 +00:00
Zuul b6e353a2c8 Merge "support pci numa affinity policies in flavor and image" 2019-12-13 00:25:32 +00:00
Matt Riedemann 18179aee4e Add CrossCellWeigher
When performing a resize, we'll want to (by default) select
target hosts from the source cell to do a traditional resize
if possible before considering target hosts in another cell
which will be slower and more complicated. If the source cell
is disabled or target flavor is not available in the source cell,
then we'll have no choice but to select a host from another cell.
But all things being equal between hosts, we want to stay within
the source cell (by default). Therefore this change adds a new
CrossCellWeigher and related configuration option to prefer hosts
within the source cell when moving a server. The weigher is
completely noop unless a cross-cell move is permitted by
configuration, which will be provided in a future change.

Part of blueprint cross-cell-resize

Change-Id: Ib18752efa56cfeb860487fe6b26102bb4b1db038
2019-12-12 12:40:29 -05:00
Monty Taylor e7cc5efd20 Keep pre-commit inline with hacking and fix whitespace
The flake8 hook for pre-commit installs its own flake8 which is
not what hacking is pinned to. This results in a bunch of errors.
By doing a local hook we can cause these to be the same.

There are flake8 exclusions in tox.ini that need to be used
in pre-commit. Also we should exclude svg files from the whitespace
modifications, because who cares.

Once those are fixed, running pre-commit -a fixes some whitespace
issues. While the normal use isn't to run -a - if someone does make
a patch that touches any of these they'll get erroneous unrelated
errors compared to their lower work - so fix all of the existing
issues, which are mostly space-at-end-of-line issues it seems.

Change-Id: I78e753492e99c03b30a0a691db3bd75ee3d289c9
2019-12-12 14:56:39 +00:00
Matt Riedemann 6c704cc1c5 Add resource provider allocation unset example to troubleshooting doc
Now that the openstack resource provider allocation unset command is
available [1] this change adds a note about using it in the troubleshooting
doc for cleaning up orphaned allocations.

Sub-sections are used to try and separate the two non-heal_allocations
solutions with the recommended solution first (using the new unset command).

While in here I noticed a typo in the heal_allocations section as well and
fixed it.

[1] I627bfd1ff699d075028da6afafbe7fb9b2f13058

Change-Id: I896bb68c4bdd35d051ef3e95e19bdeb472f9bc99
Related-Bug: #1829479
2019-12-11 17:32:14 +00:00
Matt Riedemann 1a17fe8aab Add troubleshooting doc about rebuilding the placement db
This has come up a few times via support questions from operators
that have a nova cell database out of sync with the placement
database resulting in a mismatch in compute nodes to provider
uuids and they just want to wipe the placement database and rebuild
it from the current data in nova. This provides a document with the
high level steps to do that.

Change-Id: Ie4fed22615f60e132a887fe541771c447fae1082
2019-12-11 10:40:44 -05:00
Sean Mooney 8c72241726 support pci numa affinity policies in flavor and image
This addresses bug #1795920 by adding support for
defining a pci numa affinity policy via the flavor
extra specs or image metadata properties enabling
the policies to be applied to neutron sriov port
including hardware offloaded ovs.

Closes-Bug: #1795920
Related-Bug: #1805891
Implements: blueprint vm-scoped-sriov-numa-affinity
Change-Id: Ibd62b24c2bd2dd208d0f804378d4e4f2bbfdaed6
2019-12-11 14:39:12 +00:00
Boris Bobrov 1a88d35cb1 Also enable iommu for virtio controllers and video in libvirt
Ie54fca066f33 added logic to libvirt/designer.py for enabling iommu
for certain devices where virtio is used.  This is required for AMD
SEV[0].  However it missed two cases.

Firstly, a SCSI controller can have the model as 'virtio-scsi', e.g.:

    <controller type='scsi' index='0' model='virtio-scsi'>

As with other virtio devices, here a child element needs to be added
to the config when SEV is enabled:

    <driver iommu="on" />

We do not need to cover the case of a controller with type
'virtio-serial' now, since even though it is supported by libvirt, it
is not currently used anywhere in Nova.

Secondly, a video device can be virtio, e.g. when vgpus are in use:

    <video>
        <model type='virtio'/>
    </video>

Also take this opportunity to clarify the corresponding documentation
around disk bus options.

[0] http://specs.openstack.org/openstack/nova-specs/specs/train/approved/amd-sev-libvirt-support.html#proposed-change

Partial-Bug: #1845986
Change-Id: I626c35d1653e6a25125320032d0a4a0c67ab8bcf
2019-12-10 11:01:08 +00:00
xiaojueguan 9a13b02d9e Fix Typo mistake in documentation of "host aggregates in nova"
Change-Id: I74e169705e3c5dff03b0a478b1e8ce4d7504dca2
Closes-Bug: 1855314
2019-12-07 10:32:12 +08:00
Eric Fried 54195a1bd9 Use Placement 1.34 (string suffixes & mappings)
This commit cuts us over to using placement microversion 1.34 for GET
/allocation_candidates, thereby supporting string request group suffixes
(added in 1.33) when specified in flavor extra_specs.

The mappings (added in 1.34) are not used in code yet, but a future
patch will tie the group suffixes to the RequestGroup.requester_id so
that it can be correlated after GET /a_c. This will allow us to get rid
of map_requested_resources_to_providers, which was a hack to bridge the
gap until we had mappings from placement.

Change-Id: I52499ff6639c1a5815a8557b22dd33106dcc386b
2019-12-05 17:02:46 -06:00
Zuul 2230ec836b Merge "Integrate 'pre-commit'" 2019-12-05 12:26:58 +00:00
Zuul 60b80894a0 Merge "docs: Clarify configuration steps for PF devices" 2019-12-03 20:10:05 +00:00
Zuul 4d08540a0e Merge "docs: Change order of PCI configuration steps" 2019-12-03 20:09:58 +00:00
Stephen Finucane 810aafc5ec docs: Clarify configuration steps for PF devices
Devices that report SR-IOV capabilities cannot be used without special
configuration - namely, the addition of "'device_type': 'type-PF'" or
"'device_type': 'type-VF'" to the '[pci] alias' configuration option.
Spell this out in the docs.

Change-Id: I4abbe30505a5e4ccba16027addd6d5f45066e31b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1852727
2019-12-02 16:31:28 +00:00
Zuul bed6e8ead9 Merge "docs: Blast final references to nova-network" 2019-11-30 16:57:14 +00:00
Zuul a6a42cf248 Merge "Follow up I18d73212f9d98bc75974a024cf6fd872fdfb1ca4" 2019-11-29 20:56:18 +00:00
Stephen Finucane 5dcfd0750f docs: Blast final references to nova-network
Missed a few. Let's go again.

Change-Id: I26368cb59b08f3271d74310d0aa1e36f3d0db5d5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-11-29 17:20:02 +00:00
Matt Riedemann dc1402666f Follow up I18d73212f9d98bc75974a024cf6fd872fdfb1ca4
Multiple cells is not a requirement for using the API metadata
service so this fixes the change based on the nova-network multi-host
change [1].

[1] https://review.opendev.org/#/c/686816/12/doc/source/install/get-started-compute.rst@29

Change-Id: Ie033e6f328a8be903c56b45fdfb019b0046f23ad
2019-11-29 12:07:20 -05:00
Zuul d209dd7d52 Merge "Add sequence diagrams to resize/cold migrate contrib doc" 2019-11-29 17:02:27 +00:00
Zuul 7b66fc2229 Merge "Fix incorrect command examples" 2019-11-29 16:44:20 +00:00