Skip to content

Add openvswitch-common to neutron-api/consolidated rocks#139

Merged
hemanthnakkina merged 1 commit intocanonical:mainfrom
MylesJP:gazpacho-update
Apr 23, 2026
Merged

Add openvswitch-common to neutron-api/consolidated rocks#139
hemanthnakkina merged 1 commit intocanonical:mainfrom
MylesJP:gazpacho-update

Conversation

@MylesJP
Copy link
Copy Markdown

@MylesJP MylesJP commented Apr 22, 2026

The neutron-api package now runs under apache+mod_wsgi instead of as a standalone neutron-server process. When mod_wsgi imports the WSGI application, neutron.server.api publishes a PROCESS/BEFORE_SPAWN event on every worker fork, which triggers OVNMechanismDriver.pre_fork_initialize. That callback shells out to ovsdb-client which was missing previously.

@hemanthnakkina
Copy link
Copy Markdown
Collaborator

The neutron-api package now runs under apache+mod_wsgi instead of as a standalone neutron-server process. When mod_wsgi imports the WSGI application, neutron.server.api publishes a PROCESS/BEFORE_SPAWN event on every worker fork, which triggers OVNMechanismDriver.pre_fork_initialize. That callback shells out to ovsdb-client which was missing previously.

neutron uses python libraries ovs and ovsdbapp to communicate with ovs/ovn https://opendev.org/openstack/neutron/src/branch/master/requirements.txt#L46

What exactly the issue you are facing? We may not require openvswitch-common

@MylesJP
Copy link
Copy Markdown
Author

MylesJP commented Apr 23, 2026

The neutron-api package now runs under apache+mod_wsgi instead of as a standalone neutron-server process. When mod_wsgi imports the WSGI application, neutron.server.api publishes a PROCESS/BEFORE_SPAWN event on every worker fork, which triggers OVNMechanismDriver.pre_fork_initialize. That callback shells out to ovsdb-client which was missing previously.

neutron uses python libraries ovs and ovsdbapp to communicate with ovs/ovn https://opendev.org/openstack/neutron/src/branch/master/requirements.txt#L46

What exactly the issue you are facing? We may not require openvswitch-common

I'm getting this error in the neutron pebble logs:

neutron_lib.callbacks.exceptions.CallbackFailure: Callback
neutron.plugins.ml2.drivers.ovn.mech_driver.mech_driver.OVNMechanismDriver.pre_fork_initialize
failed with "[Errno 2] No such file or directory: 'ovsdb-client'"

The traceback comes from the pre_fork_initialize method which calls this method. It looks like that was added 4 years ago but maybe it just wasn't exercised? I think it may only be used under mod_wsgi.

@hemanthnakkina
Copy link
Copy Markdown
Collaborator

The neutron-api package now runs under apache+mod_wsgi instead of as a standalone neutron-server process. When mod_wsgi imports the WSGI application, neutron.server.api publishes a PROCESS/BEFORE_SPAWN event on every worker fork, which triggers OVNMechanismDriver.pre_fork_initialize. That callback shells out to ovsdb-client which was missing previously.

neutron uses python libraries ovs and ovsdbapp to communicate with ovs/ovn https://opendev.org/openstack/neutron/src/branch/master/requirements.txt#L46
What exactly the issue you are facing? We may not require openvswitch-common

I'm getting this error in the neutron pebble logs:

neutron_lib.callbacks.exceptions.CallbackFailure: Callback
neutron.plugins.ml2.drivers.ovn.mech_driver.mech_driver.OVNMechanismDriver.pre_fork_initialize
failed with "[Errno 2] No such file or directory: 'ovsdb-client'"

The traceback comes from the pre_fork_initialize method which calls this method. It looks like that was added 4 years ago but maybe it just wasn't exercised? I think it may only be used under mod_wsgi.

Ok I see it now. Prior to Resolute, we use neutron-server which is a meta package that contains openvswitch-common as well. As part of the split, only neutron-api package is installed instead of neutron-server and so other necessary packages like openvswitch-common should be installed as part of rock.

@hemanthnakkina
Copy link
Copy Markdown
Collaborator

@MylesJP Can you push the signed commit

The neutron-api package now runs under apache+mod_wsgi instead of as a
standalone neutron-server process. When mod_wsgi imports the WSGI
application, neutron.server.api publishes a PROCESS/BEFORE_SPAWN event
on every worker fork, which triggers OVNMechanismDriver.pre_fork_initialize.
That callback shells out to ovsdb-client which was missing previously.

Signed-off-by: Myles Penner <myles.penner@canonical.com>
@hemanthnakkina hemanthnakkina merged commit c747f87 into canonical:main Apr 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants