Skip to content

OVS-DPDK startup race: PCI devices are bound after ovs-vswitchd starts #303

Description

@fpolanco-one

There is a startup-ordering issue between openvswitch.service and the generated opennebula-ovs.service.

The generated service contains:

After=openvswitch.service network-pre.target
Requires=openvswitch.service

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/opennebula-ovs.sh

However, openvswitch.service starts ovs-vswitchd.service, while the PCI driver binding required by the DPDK interfaces is performed inside opennebula-ovs.sh.

As a result, ovs-vswitchd starts before the physical interfaces have been prepared for DPDK.

Relevant one-deploy files:

roles/openvswitch/templates/opennebula-ovs.service.jinja
roles/openvswitch/templates/opennebula-ovs.sh.jinja

Observed behavior

The affected host uses two physical interfaces in an OVS-DPDK bond:

0000:17:00.0 → vmnic0
0000:ca:00.0 → vmnic6

During boot, ovs-vswitchd repeatedly attempted to attach the interfaces before they were bound to vfio-pci:

EAL: Driver cannot attach the device (0000:17:00.0)
EAL: Driver cannot attach the device (0000:ca:00.0)
EAL: Failed to attach device on primary process
netdev_dpdk|WARN|Error attaching device

The one-deploy networking script subsequently executed the PCI binding operations, after which both interfaces eventually attached successfully.

Expected behavior

The PCI devices required by OVS-DPDK should be prepared before ovs-vswitchd attempts to initialize them.

Actual behavior

OVS starts first and attempts to initialize PCI devices that have not yet been bound to the required driver.

The interfaces eventually recovered in our validation, but this introduces avoidable startup errors and a dependency on DPDK retry behavior.

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions