~dmitriis/+git/nova:2021-09-10-off-path-net-backends

Last commit made on 2021-11-19
Get this branch:
git clone -b 2021-09-10-off-path-net-backends https://git.launchpad.net/~dmitriis/+git/nova
Only Dmitrii Shcherbakov can upload to this branch. If you are Dmitrii Shcherbakov please log in for upload directions.

Branch merges

Branch information

Name:
2021-09-10-off-path-net-backends
Repository:
lp:~dmitriis/+git/nova

Recent commits

3d391e0... by Dmitrii Shcherbakov

[yoga] Support remote-managed SmartNIC DPU ports

This change comes as a part of the "Off-path Networking Backends
Support" spec implementation.

https://review.opendev.org/c/openstack/nova-specs/+/787458

Remotely managed VFs need to be classified
as such based on a port type used at port creation. VF logical number
and PF mac also need to be passed to Neutron in port updates to allow
remote_managed ports to be set up correctly on a SmartNIC DPU.

* Add a new PCI whitelist tag called "remote_managed".
  * Ports of VNIC_TYPE_SMARTNIC are managed remotely from a SmartNIC
  DPU's operating system. Operators need a way to specify which devices
  to treat as remotely managed since there is no meta information
  database that would associate vendor and device IDs with the
  information about whether they are remotely managed or not. For that
  purpose, a new PCI device whitelist tag is introduced. By default, it
  is assumed that its value will be False unless overridden explicitly
  in the whitelist specified in a config file. PCI device requests get
  a remote_managed value based on a port type and the logic invoked by
  the PciPassthroughFilter takes care of matching this request value
  against the remote_managed tag obtained from the whitelist
  configuration.

* Include pf mac and vf num in port updates
  * Adds methods to retrieve those at runtime for a VF and include them
  in port updates to Neutron.

* Use the noop os-vif plugin for VNIC_TYPE_SMARTNIC ports in order to
  avoid the invocation of the local representor plugging logic since
  a networking backend is responsible for that in this case.

* Expect bind time events for ports of VNIC_TYPE_SMARTNIC. Events for
  those arrive early from Neutron after a port update (before Nova
  begins to wait in the virt driver code, therefore, Nova is set
  to avoid waiting for plug events for VNIC_TYPE_SMARTNIC ports.

* Make sure the service version is high enough on all compute services
  before creating instances with ports that have VNIC type
  VNIC_TYPE_SMARTNIC. Network requests are examined for the presence of
  port ids to determine the VNIC type via Neutron API. If SmartNIC
  ports are requested, a compute service version check is performed
  across all cells.

Change-Id: I168d3ccc914f25a3d4255c9b319ee6b91a2f66e2
Depends-On: I07ef52769da72cde8867f996111b7df4a80e4d79
Depends-On: I6445433142286728a8c7efadcf80d07082d60bc3

982400b... by Dmitrii Shcherbakov

[yoga] Add PCI VPD Capability Handling

This change comes as a part of the "Off-path Networking Backends
Support" spec implementation.

https://review.opendev.org/c/openstack/nova-specs/+/787458

* Add VPD capability parsing support
  * The XML data from libvirt is parsed and formatted into PCI device
    JSON dict that is sent to Nova API and is stored in the extra_info
    column of a PciDevice.

    The code gracefully handles the lack of the capability since it is
    optional or Libvirt may not support it in a particular release.
* Pass the serial number to Neutron in port updates
  If a card serial number is present based on the information from PCI
  VPD, pass it to Neutron along with other PCI-related information.

A corresponding Libvirt change (to be merged).

https://listman.redhat.com/archives/libvir-list/2021-October/msg00546.html

Change-Id: I6445433142286728a8c7efadcf80d07082d60bc3
Depends-On: I07ef52769da72cde8867f996111b7df4a80e4d79

69b0d31... by Zuul <email address hidden>

Merge "Add a WA flag waiting for vif-plugged event during reboot"

7aa3a0f... by Zuul <email address hidden>

Merge "libvirt: Switch the default video model from 'cirrus' to 'virtio'"

52bd1e5... by Stephen Finucane

tests: Enable SQLAlchemy 2.0 deprecation warnings

Well, sort of. We enable them but immediately filter out the ones we're
actually seeing, the rationale being that we can address these in a
piecemeal fashion without the risk of introducing new issues.

There's a lot more to be done here. However, the work done in oslo.db
[1] should provide a guide for how to resolve the outstanding issues.

[1] https://review.opendev.org/q/topic:%2522sqlalchemy-20%2522+project:openstack/oslo.db

Change-Id: Iafe726d3819031c357460fd131bb2bb58babb4e2
Signed-off-by: Stephen Finucane <email address hidden>

e28afc5... by Stephen Finucane

tests: Restore - don't reset - warning filters

There are more various warning filters pre-configured in a typical
Python environment, including a few from third-party libraries such as
requests [1][2] and urllib3 [3] as well as stdlib [4]. Our fixture to
configure warnings, 'WarningsFixture', called 'warnings.resetwarnings'
which *reset* all the warning filters [5]. This is clearly not something
we want to do, and resulted in tests puking warnings after the initial
test run.

Resolve this by backing up the existing warning filters before applying
the filter, and then *restoring* this original list of warning filters
after the test run.

[1] https://github.com/psf/requests/blob/v2.26.0/requests/__init__.py#L127
[2] https://github.com/psf/requests/blob/v2.26.0/requests/__init__.py#L152
[3] https://github.com/urllib3/urllib3/blob/1.26.7/src/urllib3/__init__.py#L68-L78
[4] https://docs.python.org/3.8/library/warnings.html#default-warning-filter
[5] https://docs.python.org/3.8/library/warnings.html#warnings.resetwarnings

Change-Id: I63f57980e01f472a25821790610f0836f1882a7f
Signed-off-by: Stephen Finucane <email address hidden>

79436a8... by Zuul <email address hidden>

Merge "Set "cache_ok=True" in "TypeDecorator" inheriting classes"

20c8983... by Zuul <email address hidden>

Merge "Log failed metadata retrievals"

a1e7ed3... by Zuul <email address hidden>

Merge "Apply common irrelevant_files for centos 8 job"

70998b2... by Zuul <email address hidden>

Merge "db: Remove nova-network models"