diff --git a/defaults/main.yml b/defaults/main.yml index 661d7e5a..7fe12c40 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -183,18 +183,19 @@ _neutron_rootwrap_conf_overrides: neutron_rootwrap_conf_overrides: {} neutron_api_uwsgi_ini_overrides: {} -neutron_server_init_overrides: {} +neutron_periodic_workers_init_overrides: {} neutron_rpc_server_init_overrides: {} +neutron_server_init_overrides: {} neutron_sriov_nic_agent_ini_overrides: {} neutron_sriov_nic_agent_init_overrides: {} +neutron_ovn_maintenance_init_overrides: {} neutron_ovn_metadata_agent_ini_overrides: {} neutron_ovn_metadata_agent_init_overrides: {} ### ### UWSGI ### -# NOTE(noonedeadpunk): uWSGI is still not fully supported. See: https://bugs.launchpad.net/neutron/+bug/1912359 -neutron_use_uwsgi: False +neutron_use_uwsgi: True neutron_wsgi_processes_max: 16 neutron_wsgi_processes: "{{ [[ansible_facts['processor_vcpus'] | default(1), 1] | max * 2, neutron_wsgi_processes_max] | min }}" neutron_wsgi_threads: 1 diff --git a/releasenotes/notes/neutron_uwsgi_re-enabled-d75d0362aaf32278.yaml b/releasenotes/notes/neutron_uwsgi_re-enabled-d75d0362aaf32278.yaml new file mode 100644 index 00000000..501baf74 --- /dev/null +++ b/releasenotes/notes/neutron_uwsgi_re-enabled-d75d0362aaf32278.yaml @@ -0,0 +1,24 @@ +--- +upgrade: + - | + uWSGI has been re-enabled by default for Neutron one more time. With that + new services are introduced which should ensure adequate functionality of + Neutron when uWSGI is being used. + + - ``neutron-periodic-workers`` service is enabled for all drivers when + WSGI is being used. It runs along with previously existing + ``neutron-rpc-server`` + + - ``neutron-ovn-maintenance-worker`` service is added only if `ml2.ovn` + is being used as ``neutron_plugin_type``. The service will be enabled + and running only when WSGI is used for Neutron ``neutron_use_uwsgi`` is + set to `True` + + - | + If you are using Ubuntu 22.04 Jammy Jellyfish and ``install_method: distro`` + please make sure to disable ``neutron_use_uwsgi`` as required binaries for + this mode to work are missing from packages for this distro. +fixes: + - | + Issues with uWSGI mode for Neutron has been addressed and uWSGI be used + for the service. diff --git a/vars/main.yml b/vars/main.yml index f712e31a..15d48d3d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -513,6 +513,31 @@ neutron_services: {% if ('ml2.genericswitch' in neutron_plugin_types) -%} --config-file {{ neutron_conf_dir }}/{{ neutron_plugins['ml2.genericswitch'].plugin_ini }} {% endif %} + neutron-periodic-workers: + group: neutron_server + service_name: neutron-periodic-workers + service_en: True + enabled: "{{ neutron_use_uwsgi }}" + state: "{{ neutron_use_uwsgi | ternary('started', 'stopped') }}" + init_config_overrides: "{{ neutron_periodic_workers_init_overrides | combine(neutron_server_init_overrides) }}" + start_order: 2 + execstarts: >- + {{ neutron_bin }}/neutron-periodic-workers --config-file {{ neutron_conf_dir }}/neutron.conf + --config-file {{ neutron_conf_dir }}/{{ neutron_plugins[neutron_plugin_type].plugin_ini }} + {% if ('ml2.genericswitch' in neutron_plugin_types) -%} + --config-file {{ neutron_conf_dir }}/{{ neutron_plugins['ml2.genericswitch'].plugin_ini }} + {% endif %} + neutron-ovn-maintenance-worker: + group: neutron_server + service_name: neutron-ovn-maintenance-worker + service_en: "{{ neutron_plugin_type == 'ml2.ovn' }}" + enabled: "{{ neutron_use_uwsgi and neutron_plugin_type == 'ml2.ovn' }}" + state: "{{ (neutron_use_uwsgi and neutron_plugin_type == 'ml2.ovn') | ternary('started', 'stopped') }}" + init_config_overrides: "{{ neutron_ovn_maintenance_init_overrides | combine(neutron_server_init_overrides) }}" + start_order: 2 + execstarts: >- + {{ neutron_bin }}/neutron-ovn-maintenance-worker --config-file {{ neutron_conf_dir }}/neutron.conf + --config-file {{ neutron_conf_dir }}/{{ neutron_plugins[neutron_plugin_type].plugin_ini }} neutron-sriov-nic-agent: group: neutron_sriov_nic_agent service_name: neutron-sriov-nic-agent