[eventlet-removal] ovs: remove the usage of eventlet in the OVS agent

This commits remove any usage of greenthreads for OVS Agent.

NOTES:
* The "OSKEN_HUB_TYPE" is set to "native". Once the eventlet removal is
  finished and the default backend is "native", this line will be
  removed.
* The ``oslo.service`` backend is set to "threading".

Closes-bug: #2087939
Change-Id: I04ac8336db70cf93da43ed17da11c594b441f5eb
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
This commit is contained in:
Sahid Orentino Ferdjaoui
2025-02-07 16:56:47 +01:00
committed by Rodolfo Alonso
parent de72132d51
commit ad927935ab
3 changed files with 18 additions and 5 deletions

View File

@@ -13,10 +13,23 @@
# License for the specific language governing permissions and limitations
# under the License.
import setproctitle
# NOTE(ralonsoh): remove once the default backend is ``BackendType.THREADING``
import os
import neutron.plugins.ml2.drivers.openvswitch.agent.main as agent_main
from neutron_lib import constants
import oslo_service.backend as service
service.init_backend(service.BackendType.THREADING)
# NOTE: the environment variable "OSKEN_HUB_TYPE" defines the ``os-ken``
# hub type to be used. The default value is now "eventlet". Once the
# default value is set to "native", we will remove the following line.
os.environ['OSKEN_HUB_TYPE'] = 'native'
# pylint: disable=wrong-import-position, line-too-long
import setproctitle # noqa: E402
import neutron.plugins.ml2.drivers.openvswitch.agent.main as agent_main # noqa: E402,E501
from neutron_lib import constants # noqa: E402
def main():

View File

@@ -18,7 +18,7 @@ import sys
from neutron_lib import constants as n_const
from oslo_utils import encodeutils
from neutron.cmd.eventlet.plugins.ovs_neutron_agent import main as _main
from neutron.cmd.agents.ovs_neutron_agent import main as _main
from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent

View File

@@ -40,7 +40,7 @@ console_scripts =
neutron-macvtap-agent = neutron.cmd.eventlet.plugins.macvtap_neutron_agent:main
neutron-metadata-agent = neutron.cmd.agents.metadata:main
neutron-netns-cleanup = neutron.cmd.netns_cleanup:main
neutron-openvswitch-agent = neutron.cmd.eventlet.plugins.ovs_neutron_agent:main
neutron-openvswitch-agent = neutron.cmd.agents.ovs_neutron_agent:main
neutron-ovs-cleanup = neutron.cmd.ovs_cleanup:main
neutron-server = neutron.cmd.eventlet.server:main
neutron-rpc-server = neutron.cmd.server:main_rpc