
The openstack-hypervisor snap can now receive a list of dpdk ports that will be: * bound to the dpdk compatible driver (defaults to vfio-pci) * added to bonds and bridges based on the existing maas/netplan configuration https://github.com/canonical/snap-openstack-hypervisor/pull/111 The charm will receive the list of dpdk ports through the "set-hypervisor-local-settings" action using the "ovs-dpdk-ports" key. The OVS pinned cpus and huge pages will then be reconfigured based on the NUMA nodes of the specified interfaces. While at it, we'll ensure that the system ovs-dpctl binary is used instead of the snap alias when clearing system data paths. Change-Id: I727b49d1df9d77a9d4ee51ac11aa264806f662b3 Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
249 lines
7.8 KiB
YAML
249 lines
7.8 KiB
YAML
type: charm
|
|
title: OpenStack Hypervisor
|
|
name: openstack-hypervisor
|
|
summary: Deploy the OpenStack hypervisor
|
|
description: |
|
|
Configure machine to run VMs as part of an OpenStack cloud.
|
|
assumes:
|
|
- juju >= 3.1
|
|
|
|
base: ubuntu@24.04
|
|
platforms:
|
|
amd64:
|
|
|
|
config:
|
|
options:
|
|
snap-channel:
|
|
default: 2025.1/edge
|
|
type: string
|
|
debug:
|
|
default: false
|
|
type: boolean
|
|
resume-on-boot:
|
|
default: true
|
|
description: |
|
|
Whether to resume the guest VMs when the host boots.
|
|
type: boolean
|
|
dns-servers:
|
|
default: 8.8.8.8
|
|
type: string
|
|
external-bridge:
|
|
default: br-ex
|
|
type: string
|
|
external-bridge-address:
|
|
default: 10.20.20.1/24
|
|
type: string
|
|
physnet-name:
|
|
default: physnet1
|
|
type: string
|
|
use-migration-binding:
|
|
default: false
|
|
type: boolean
|
|
use-data-binding:
|
|
default: false
|
|
type: boolean
|
|
reserved-host-memory-mb-for-sev:
|
|
type: string
|
|
description: |
|
|
Memory to be reserved for host for SEV enabled compute
|
|
hosts. This memory will be used for instances. The compute
|
|
usage report deducts this memory from the available
|
|
memory sent to the placement service.
|
|
pci-device-specs:
|
|
type: string
|
|
description: |
|
|
A list of device specs used to set the `pci.device_spec` option in
|
|
nova.conf, which allows PCI passthrough of specific devices to VMs.
|
|
|
|
Example applications: GPU processing, SR-IOV networking, etc.
|
|
|
|
NOTE: For PCI passthrough to work IOMMU must be enabled on the machine
|
|
deployed to. This can be accomplished by setting kernel parameters on
|
|
capable machines in MAAS, tagging them and using these tags as
|
|
constraints in the model.
|
|
|
|
Examples:
|
|
|
|
* specify the PF address, exposing all the corresponding VFs:
|
|
[{"physical_network": "physnet1", "address": "0000:1b:00.0"}]
|
|
* pick VFs individually:
|
|
[{"physical_network": "physnet2", "address": "0000:1b:10.0"},
|
|
{"physical_network": "physnet2", "address": "0000:1b:10.2}]
|
|
* address wildcards:
|
|
[{"physical_network": "physnet1", "address": "*:1b:10.*"},
|
|
{"physical_network": "physnet1", "address": ":1b:}]
|
|
* address regex patterns:
|
|
[{"physical_network": "physnet1",
|
|
"address":
|
|
{"domain": ".*", "bus": "1b", "slot": "10", "function": "[0-4]"}}]
|
|
* vendor and product id:
|
|
[{"physical_network": "physnet1", "vendor_id": "8086", "product_id": "1563"}]
|
|
dpdk-enabled:
|
|
default: false
|
|
type: boolean
|
|
description: |
|
|
Enable OVS DPDK data path, handling packets in userspace. This provides
|
|
improved performance compared to the standard OVS kernel data path.
|
|
DPDK capable network interfaces are required.
|
|
dpdk-datapath-cores:
|
|
default: 0
|
|
type: int
|
|
description: |
|
|
The number of cores allocated to OVS datapath processing. A dedicated
|
|
list of cores will be obtained from the EPA service and passed to OVS
|
|
through "other_config:pmd-cpu-mask".
|
|
dpdk-control-plane-cores:
|
|
default: 0
|
|
type: int
|
|
description: |
|
|
The number of cores allocated to OVS control plane processing. A dedicated
|
|
list of cores will be obtained from the EPA service and passed to OVS
|
|
through "other_config:dpdk-lcore-mask.
|
|
dpdk-memory:
|
|
default: 0
|
|
type: int
|
|
description: |
|
|
The total amount of memory in MB to allocate from hugepages for OVS DPDK.
|
|
The charm will distribute this memory across NUMA nodes based on the
|
|
bridged network interfaces and then pass it to OVS using
|
|
"other_config:dpdk-socket-mem".
|
|
dpdk-driver:
|
|
default: vfio-pci
|
|
type: string
|
|
description: The driver used for DPDK physical ports.
|
|
|
|
actions:
|
|
set-hypervisor-local-settings:
|
|
description: |
|
|
Apply settings specific to this hypervisor unit
|
|
params:
|
|
external-nic:
|
|
type: string
|
|
description: NIC that hypervisor will configure for North/South traffic
|
|
spice-proxy-address:
|
|
type: string
|
|
description: IP address to use for configuration of SPICE consoles in instances.
|
|
ip-address:
|
|
type: string
|
|
description: IP address to use for service configuration
|
|
pci-excluded-devices:
|
|
type: string
|
|
description: |
|
|
A list of PCI addresses that will be excluded from the Nova PCI device whitelist.
|
|
The main purpose of this setting is to accommodate per-node exclusion lists.
|
|
|
|
For example, let's say that the user whitelisted all Intel x550 devices and then
|
|
excluded one out of 4 such interfaces:
|
|
pci_device_specs = [{"vendor_id": "8086", "product_id": "1563"}]
|
|
excluded_devices = ["0000:1b:00.1"]
|
|
|
|
The updated device spec will contain the vendor/product and pci address of the remaining
|
|
3 Intel x550 devies.
|
|
|
|
[
|
|
{"vendor_id": "8086", "product_id": "1563", "address": "0000:19:00.0"},
|
|
{"vendor_id": "8086", "product_id": "1563", "address": "0000:19:00.1"},
|
|
{"vendor_id": "8086", "product_id": "1563", "address": "0000:1b:00.0"},
|
|
]
|
|
|
|
A device spec that doesn't contain any excluded devices will not be modified.
|
|
ovs-dpdk-ports:
|
|
type: string
|
|
description: |
|
|
Comma separated list of interface names that will be used with DPDK.
|
|
|
|
The interfaces will be bound to the DPDK-compatible driver (vfio-pci by default) and
|
|
corresponding DPDK ports will be created in OVS. Any bridges and bonds that use
|
|
those interfaces will be updated with the resulting DPDK ports, based on the
|
|
MAAS/Netplan configuration.
|
|
|
|
The NUMA nodes of those interfaces will be used to determine pinned CPUs
|
|
and huge pages used by OVS.
|
|
additionalProperties: false
|
|
list-nics:
|
|
description: |
|
|
List host NICS, and which one are candidates for use as external NIC.
|
|
additionalProperties: false
|
|
disable:
|
|
description: |
|
|
Prevent new instances from being created.
|
|
params:
|
|
reason:
|
|
type: string
|
|
description: Reason for disabling the hypervisor
|
|
default: Stopped via operator action
|
|
additionalProperties: false
|
|
enable:
|
|
description: |
|
|
Allow new instances to be created.
|
|
additionalProperties: false
|
|
running-guests:
|
|
description: |
|
|
List the running guests on the hypervisor.
|
|
|
|
Only lists guests created by the OpenStack cloud.
|
|
additionalProperties: false
|
|
list-flavors:
|
|
description: |
|
|
List the flavors or compute host capabilities.
|
|
|
|
requires:
|
|
amqp:
|
|
interface: rabbitmq
|
|
identity-credentials:
|
|
interface: keystone-credentials
|
|
ovsdb-cms:
|
|
interface: ovsdb-cms
|
|
certificates:
|
|
interface: tls-certificates
|
|
optional: true
|
|
ceilometer-service:
|
|
interface: ceilometer
|
|
optional: true
|
|
ceph-access:
|
|
interface: cinder-ceph-key
|
|
optional: true
|
|
receive-ca-cert:
|
|
interface: certificate_transfer
|
|
optional: true
|
|
nova-service:
|
|
interface: nova
|
|
masakari-service:
|
|
interface: service-ready
|
|
optional: true
|
|
consul-notify:
|
|
interface: consul-notify
|
|
optional: true
|
|
tracing:
|
|
interface: tracing
|
|
optional: true
|
|
limit: 1
|
|
|
|
provides:
|
|
cos-agent:
|
|
interface: cos_agent
|
|
|
|
extra-bindings:
|
|
migration: null
|
|
data: null
|
|
|
|
parts:
|
|
charm:
|
|
build-packages:
|
|
- git
|
|
- libffi-dev
|
|
- libssl-dev
|
|
- pkg-config
|
|
- rustc-1.80
|
|
- cargo-1.80
|
|
charm-binary-python-packages:
|
|
- cryptography
|
|
- jsonschema
|
|
- pydantic
|
|
- jinja2
|
|
build-snaps: [astral-uv]
|
|
override-build: |
|
|
uv export --frozen --no-hashes --format=requirements-txt -o requirements.txt
|
|
craftctl default
|
|
charm-requirements: [requirements.txt]
|