-
Notifications
You must be signed in to change notification settings - Fork 224
Allows non standard OVS setups #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7384837 to
4203d23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for improving upon #425 !
We're failing some coverage- and integration-tests here. For system specific checks, such as location of binaries, feel free to exclude them from the coverage:
- Python
- #pragma: nocover
- C
- // LCOV_EXCL_START
- // LCOV_EXCL_STOP
The approach of this PR is generally fine. It doesn't change major logic or architecture of Netplan, but only makes it more flexible to prefert /snap/bin/ovs-vsctl in favour of /usr/bin/ovs-vsctl if available.
I left a bunch of inline comments for your to look at.
c239938 to
e5d682b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks this mostly LGTM! I left a few minor inline remarks. Can you please double-check those, before we merge it?
| pass | ||
|
|
||
|
|
||
| def _ovs_vsctl_path(): # pragma: nocover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note (non-blocking): This is specific to the installed system, so excluding it from the coverage is OK. Same for the other cases below.
eecc0c4 to
edefde0
Compare
Changes the checks to be based around the availability of the command line OVS tools instead of the availability of the service installed under apt. This allows netplan to consume OVS when it is provided as part of another package such as in snap environments. This involves minor changes to lots of the OVS code and also modifies the unit tests as to handle OVS from both standard and nonstandard setups. Signed-off-by: MJ Ponsonby <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your contribution to Netplan! And for resolving all of my remarks.
CI tests are all green and this LGTM.
Ready to be merged.
OVS crashes if there are multiple conflicting installations. As such, the charm currently errors out when detecting system OVS services. The problem is that with DPDK, we expect OVS bridges and bonds to be preconfigured through MAAS/Netplan, which currently use system (deb) OVS packages. Instead of erroring out, we'll stop and mask system OVS services, then reapply Netplan to move the OVS bridges to the snap based OVS installation. Netplan is expected to contain the following patch: canonical/netplan#549 Note that any configuration defined in the system OVS db that's not set in Netplan will be lost. Change-Id: Id398a2e4ef4cd138aa2db35d71e021f61f94b67d Signed-off-by: Lucian Petrut <[email protected]>
This PR will allow enabling and configuring OVS DPDK, specifically: * the number of cores used by the OVS DPDK control plane and data path * the amount of memory used by OVS DPDK from huge pages * physical DPDK ports * DPDK-compatible driver (defaults to vfio-pci) The specified amount of cores will be reserved in the EPA service, make sure to configure isolated CPUs using kernel arguments. At the same time, 1GB huge pages must be preallocated. The pinned CPUs and memory will be distributed across NUMA nodes based on the NUMA location of the physical DPDK interfaces. Note that the specified DPDK interfaces will be persistently bound to the configured DPDK-compatible driver and will no longer be visible on the host. Any physical interfaces that are going to be used with DPDK are expected to be connected to OVS bridges, either directly or through a bond. The bridge and bond definitions should be predefined through Maas/Netplan. The openstack-hypervisor charm will take care of disabling the system ovs installation, move bridge definitions to the snap installation (through netplan) and then reconfigure them to use the newly defined DPDK ports. Note that Netplan is not aware of DPDK ports, as such those will be removed from the Netplan configuration and defined in OVS. We expect the host Netplan installation to include the following change in order to work with snap OVS installations: canonical/netplan#549
This PR will allow enabling and configuring OVS DPDK, specifically: * the number of cores used by the OVS DPDK control plane and data path * the amount of memory used by OVS DPDK from huge pages * physical DPDK ports * DPDK-compatible driver (defaults to vfio-pci) The specified amount of cores will be reserved in the EPA service, make sure to configure isolated CPUs using kernel arguments. At the same time, 1GB huge pages must be preallocated. The pinned CPUs and memory will be distributed across NUMA nodes based on the NUMA location of the physical DPDK interfaces. Note that the specified DPDK interfaces will be persistently bound to the configured DPDK-compatible driver and will no longer be visible on the host. Any physical interfaces that are going to be used with DPDK are expected to be connected to OVS bridges, either directly or through a bond. The bridge and bond definitions should be predefined through Maas/Netplan. The openstack-hypervisor charm will take care of disabling the system ovs installation, move bridge definitions to the snap installation (through netplan) and then reconfigure them to use the newly defined DPDK ports. Note that Netplan is not aware of DPDK ports, as such those will be removed from the Netplan configuration and defined in OVS. We expect the host Netplan installation to include the following change in order to work with snap OVS installations: canonical/netplan#549
This PR will allow enabling and configuring OVS DPDK, specifically: * the number of cores used by the OVS DPDK control plane and data path * the amount of memory used by OVS DPDK from huge pages * physical DPDK ports * DPDK-compatible driver (defaults to vfio-pci) The specified amount of cores will be reserved in the EPA service, make sure to configure isolated CPUs using kernel arguments. At the same time, 1GB huge pages must be preallocated. The pinned CPUs and memory will be distributed across NUMA nodes based on the NUMA location of the physical DPDK interfaces. Note that the specified DPDK interfaces will be persistently bound to the configured DPDK-compatible driver and will no longer be visible on the host. Any physical interfaces that are going to be used with DPDK are expected to be connected to OVS bridges, either directly or through a bond. The bridge and bond definitions should be predefined through Maas/Netplan. The openstack-hypervisor charm will take care of disabling the system ovs installation, move bridge definitions to the snap installation (through netplan) and then reconfigure them to use the newly defined DPDK ports. Note that Netplan is not aware of DPDK ports, as such those will be removed from the Netplan configuration and defined in OVS. We expect the host Netplan installation to include the following change in order to work with snap OVS installations: canonical/netplan#549
This PR will allow enabling and configuring OVS DPDK, specifically: * the number of cores used by the OVS DPDK control plane and data path * the amount of memory used by OVS DPDK from huge pages * physical DPDK ports * DPDK-compatible driver (defaults to vfio-pci) The specified amount of cores will be reserved in the EPA service, make sure to configure isolated CPUs using kernel arguments. At the same time, 1GB huge pages must be preallocated. The pinned CPUs and memory will be distributed across NUMA nodes based on the NUMA location of the physical DPDK interfaces. Note that the specified DPDK interfaces will be persistently bound to the configured DPDK-compatible driver and will no longer be visible on the host. Any physical interfaces that are going to be used with DPDK are expected to be connected to OVS bridges, either directly or through a bond. The bridge and bond definitions should be predefined through Maas/Netplan. The openstack-hypervisor charm will take care of disabling the system ovs installation, move bridge definitions to the snap installation (through netplan) and then reconfigure them to use the newly defined DPDK ports. Note that Netplan is not aware of DPDK ports, as such those will be removed from the Netplan configuration and defined in OVS. We expect the host Netplan installation to include the following change in order to work with snap OVS installations: canonical/netplan#549
This PR will allow enabling and configuring OVS DPDK, specifically: * the number of cores used by the OVS DPDK control plane and data path * the amount of memory used by OVS DPDK from huge pages * physical DPDK ports * DPDK-compatible driver (defaults to vfio-pci) The specified amount of cores will be reserved in the EPA service, make sure to configure isolated CPUs using kernel arguments. At the same time, 1GB huge pages must be preallocated. The pinned CPUs and memory will be distributed across NUMA nodes based on the NUMA location of the physical DPDK interfaces. Note that the specified DPDK interfaces will be persistently bound to the configured DPDK-compatible driver and will no longer be visible on the host. Any physical interfaces that are going to be used with DPDK are expected to be connected to OVS bridges, either directly or through a bond. The bridge and bond definitions should be predefined through Maas/Netplan. The openstack-hypervisor charm will take care of disabling the system ovs installation, move bridge definitions to the snap installation (through netplan) and then reconfigure them to use the newly defined DPDK ports. Note that Netplan is not aware of DPDK ports, as such those will be removed from the Netplan configuration and defined in OVS. We expect the host Netplan installation to include the following change in order to work with snap OVS installations: canonical/netplan#549 Signed-off-by: Lucian Petrut <[email protected]>
OVS crashes if there are multiple conflicting installations. As such, the charm currently errors out when detecting system OVS services. The problem is that with DPDK, we expect OVS bridges and bonds to be preconfigured through MAAS/Netplan, which currently use system (deb) OVS packages. Instead of erroring out, we'll stop and mask system OVS services, then reapply Netplan to move the OVS bridges to the snap based OVS installation. Netplan is expected to contain the following patch: canonical/netplan#549 Note that any configuration defined in the system OVS db that's not set in Netplan will be lost. Change-Id: Id398a2e4ef4cd138aa2db35d71e021f61f94b67d Signed-off-by: Lucian Petrut <[email protected]> (cherry picked from commit 7228578)
Changes the checks to be based around the availability of the command line OVS tools instead of the availability of the service installed under apt. This allows netplan to consume OVS when it is provided as part of another package such as in snap environments.
This involves minor changes to lots of the OVS code and also modifies the unit tests as to handle OVS from both standard and nonstandard setups.
Checklist
make checksuccessfully.make check-coverage).