From 436b3585a9942fec5712efad651cdc29e955745f Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Tue, 1 Jun 2021 14:20:50 +0200 Subject: [PATCH] Set threads=1 for other wsgi-based services In [0] we followed the release-note about using threads=1 for the nova-api service, but missed that the nova-metadata and placement service are affected by the same issue. [0] Iebf78d24c57a069eabced1bf35051cbae5014902 Conflicts: attributes/default.rb attributes/placement.rb spec/placement_api_spec.rb Bumped minor version for stable branch. Change-Id: I9107ca1a135ac090dc9cf80b5192eed4838595df (cherry picked from commit 4b796ce2fb2e6e2eb9c28d5a9d3a3db42dbafee7) --- attributes/default.rb | 6 +++--- metadata.rb | 2 +- spec/api-metadata_spec.rb | 4 ++-- spec/placement_api_spec.rb | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index ef3134b1..2d798708 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -39,13 +39,13 @@ default['openstack']['compute']['rootwrap']['syslog_log_level'] = 'ERROR' default['openstack']['compute'][service]['ssl']['ciphers'] = '' end -# Work around upstream issue with running the api service under wsgi +# Work around upstream issue with running the api services under wsgi # https://docs.openstack.org/releasenotes/nova/stein.html#known-issues default['openstack']['compute']['api']['threads'] = 1 default['openstack']['compute']['api']['processes'] = 6 -default['openstack']['compute']['placement']['threads'] = 10 +default['openstack']['compute']['placement']['threads'] = 1 default['openstack']['compute']['placement']['processes'] = 2 -default['openstack']['compute']['metadata']['threads'] = 10 +default['openstack']['compute']['metadata']['threads'] = 1 default['openstack']['compute']['metadata']['processes'] = 2 # Use Nova or Placement. By default use Nova diff --git a/metadata.rb b/metadata.rb index a4c7317a..f8b01ee8 100644 --- a/metadata.rb +++ b/metadata.rb @@ -5,7 +5,7 @@ issues_url 'https://launchpad.net/openstack-chef' source_url 'https://opendev.org/openstack/cookbook-openstack-compute' license 'Apache-2.0' description 'The OpenStack Compute service Nova.' -version '19.4.0' +version '19.5.0' chef_version '>= 15.0' diff --git a/spec/api-metadata_spec.rb b/spec/api-metadata_spec.rb index b07fd0e8..18914399 100644 --- a/spec/api-metadata_spec.rb +++ b/spec/api-metadata_spec.rb @@ -52,7 +52,7 @@ describe 'openstack-compute::api-metadata' do server_entry: '/usr/bin/nova-metadata-wsgi', server_host: '127.0.0.1', server_port: '8775', - threads: 10, + threads: 1, user: 'nova', use_ssl: false, } @@ -60,7 +60,7 @@ describe 'openstack-compute::api-metadata' do end [ /$/, - /WSGIDaemonProcess nova-metadata processes=2 threads=10 user=nova group=nova display-name=%{GROUP}$/, + /WSGIDaemonProcess nova-metadata processes=2 threads=1 user=nova group=nova display-name=%{GROUP}$/, /WSGIProcessGroup nova-metadata$/, %r{WSGIScriptAlias / /usr/bin/nova-metadata-wsgi$}, /WSGIApplicationGroup %{GLOBAL}$/, diff --git a/spec/placement_api_spec.rb b/spec/placement_api_spec.rb index 1ed6a10b..02a02e8d 100644 --- a/spec/placement_api_spec.rb +++ b/spec/placement_api_spec.rb @@ -63,7 +63,7 @@ describe 'openstack-compute::placement_api' do server_entry: '/usr/bin/nova-placement-api', server_host: '127.0.0.1', server_port: '8778', - threads: 10, + threads: 1, user: 'nova', use_ssl: false, } @@ -71,7 +71,7 @@ describe 'openstack-compute::placement_api' do end [ /$/, - /WSGIDaemonProcess placement-api processes=2 threads=10 user=nova group=nova display-name=%{GROUP}$/, + /WSGIDaemonProcess placement-api processes=2 threads=1 user=nova group=nova display-name=%{GROUP}$/, /WSGIProcessGroup placement-api$/, %r{WSGIScriptAlias / /usr/bin/nova-placement-api$}, /WSGIApplicationGroup %{GLOBAL}$/, @@ -223,7 +223,7 @@ describe 'openstack-compute::placement_api' do server_entry: '/usr/bin/placement-api', server_host: '127.0.0.1', server_port: '8778', - threads: 10, + threads: 1, user: 'placement', use_ssl: false, } @@ -231,7 +231,7 @@ describe 'openstack-compute::placement_api' do end [ /$/, - /WSGIDaemonProcess placement-api processes=2 threads=10 user=placement group=placement display-name=%{GROUP}$/, + /WSGIDaemonProcess placement-api processes=2 threads=1 user=placement group=placement display-name=%{GROUP}$/, /WSGIProcessGroup placement-api$/, %r{WSGIScriptAlias / /usr/bin/placement-api$}, /WSGIApplicationGroup %{GLOBAL}$/,