From caea2022232703f2f9f1501a16860baf1239d18b Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Thu, 19 Mar 2015 23:24:32 -0500 Subject: [PATCH] Set the neutron default workers As stated in neutron's default conf file: # This feature is experimental until issues are addressed and testing # has been # enabled for various plugins for compatibility. This change has been shown to be reliable in manual testing of the gate jobs. These jobs had been seeing transient failures possibly leading back to this value. The changes here have been set within the `bootstrap-aio.sh` script such that gating is using a consistent environment even if these options change their values in the future. Thanks to Evan Callicoat for doing the work to isolate the failures. Change-Id: I98116eef94a7240addfdf449d116ec1c24260c59 Co-Authored-By: Evan Callicoat Closes-Bug: #1425255 --- playbooks/roles/os_neutron/defaults/main.yml | 6 +++--- playbooks/roles/os_neutron/templates/neutron.conf.j2 | 4 +--- scripts/bootstrap-aio.sh | 5 +++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/playbooks/roles/os_neutron/defaults/main.yml b/playbooks/roles/os_neutron/defaults/main.yml index 80e10e34bb..01d86dc896 100644 --- a/playbooks/roles/os_neutron/defaults/main.yml +++ b/playbooks/roles/os_neutron/defaults/main.yml @@ -60,9 +60,9 @@ neutron_driver_quota: neutron.db.quota_db.DbQuotaDriver # compute the number of api workers to use. # neutron_api_workers: 16 -# If ``neutron_rpc_workers`` is unset the system will use half the number of ``neutron_api_workers`` to -# compute the number of api workers to use. -# neutron_rpc_workers: 16 +# ``neutron_rpc_workers`` is an experimental feature in neutron master (as of 03/2015) and +# the value will be 0 by default. +neutron_rpc_workers: 0 # If ``neutron_metadata_workers`` is unset the system will use half the number of available VCPUS to # compute the number of api workers to use. diff --git a/playbooks/roles/os_neutron/templates/neutron.conf.j2 b/playbooks/roles/os_neutron/templates/neutron.conf.j2 index 191f3445e1..17ecaabfaa 100644 --- a/playbooks/roles/os_neutron/templates/neutron.conf.j2 +++ b/playbooks/roles/os_neutron/templates/neutron.conf.j2 @@ -2,8 +2,6 @@ {% set _api_threads = ansible_processor_vcpus|default(2) // 2 %} {% set api_threads = _api_threads if _api_threads > 0 else 1 %} -{% set _rpc_threads = api_threads // 2 %} -{% set rpc_threads = _rpc_threads if _rpc_threads > 0 else 1 %} [DEFAULT] verbose = {{ verbose }} @@ -44,7 +42,7 @@ bind_host = 0.0.0.0 ## Workers api_workers = {{ neutron_api_workers | default(api_threads) }} -rpc_workers = {{ neutron_rpc_workers | default(rpc_threads) }} +rpc_workers = {{ neutron_rpc_workers }} ## Plugins diff --git a/scripts/bootstrap-aio.sh b/scripts/bootstrap-aio.sh index acfa8f2268..77c2d5019e 100755 --- a/scripts/bootstrap-aio.sh +++ b/scripts/bootstrap-aio.sh @@ -265,6 +265,11 @@ echo 'galera_gcache_size: 50M' | tee -a /etc/openstack_deploy/user_variables.yml # Set the running kernel as the required kernel echo "required_kernel: $(uname --kernel-release)" | tee -a /etc/openstack_deploy/user_variables.yml +# Set the running neutron workers to 0/1 +echo "neutron_api_workers: 0" | tee -a /etc/openstack_deploy/user_variables.yml +echo "neutron_rpc_workers: 0" | tee -a /etc/openstack_deploy/user_variables.yml +echo "neutron_metadata_workers: 1" | tee -a /etc/openstack_deploy/user_variables.yml + # Add in swift vars if needed if [ "${DEPLOY_SWIFT}" == "yes" ]; then # ensure that glance is configured to use swift