From 9fe12a5c2a05d37956b7ae20860672691ade97fe Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 20 Aug 2025 18:27:29 +0900 Subject: [PATCH] Replace wsgi script pbr is removing support for wsgi_script due to changes in setuptools. Use the wsgi script module python code instead. Note that this change only touches CentOS code. Ubuntu and Debian will be updated later when we bump the release used in our testing. Change-Id: Ie3a0740a69733728a254e20bd8029f04bc4106ab Signed-off-by: Takashi Kajinami --- manifests/params.pp | 14 ++++++++------ spec/defines/heat_wsgi_apache_spec.rb | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 375bb4f1..741b54a9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,6 +5,8 @@ class heat::params { include openstacklib::defaults + $pyver3 = $openstacklib::defaults::pyver3 + $client_package_name = 'python3-heatclient' $user = 'heat' $group = 'heat' @@ -21,9 +23,9 @@ class heat::params { $api_cfn_service_name = 'openstack-heat-api-cfn' $engine_service_name = 'openstack-heat-engine' # WSGI scripts - $heat_wsgi_script_path = '/var/www/cgi-bin/heat' - $heat_api_wsgi_script_source = '/usr/bin/heat-wsgi-api' - $heat_api_cfn_wsgi_script_source = '/usr/bin/heat-wsgi-api-cfn' + $heat_wsgi_script_path = '/var/www/cgi-bin/heat' + $heat_api_wsgi_script_source = "/usr/lib/python${pyver3}/site-packages/heat/wsgi/api.py" + $heat_api_cfn_wsgi_script_source = "/usr/lib/python${pyver3}/site-packages/heat/wsgi/cfn.py" } 'Debian': { # package names @@ -36,9 +38,9 @@ class heat::params { $api_cfn_service_name = 'heat-api-cfn' $engine_service_name = 'heat-engine' # WSGI scripts - $heat_wsgi_script_path = '/usr/lib/cgi-bin/heat' - $heat_api_wsgi_script_source = '/usr/bin/heat-wsgi-api' - $heat_api_cfn_wsgi_script_source = '/usr/bin/heat-wsgi-api-cfn' + $heat_wsgi_script_path = '/usr/lib/cgi-bin/heat' + $heat_api_wsgi_script_source = '/usr/bin/heat-wsgi-api' + $heat_api_cfn_wsgi_script_source = '/usr/bin/heat-wsgi-api-cfn' # Operating system specific case $facts['os']['name'] { 'Ubuntu': { diff --git a/spec/defines/heat_wsgi_apache_spec.rb b/spec/defines/heat_wsgi_apache_spec.rb index afdda6c1..94dd3f3d 100644 --- a/spec/defines/heat_wsgi_apache_spec.rb +++ b/spec/defines/heat_wsgi_apache_spec.rb @@ -89,8 +89,8 @@ describe 'heat::wsgi::apache' do } when 'RedHat' { :wsgi_script_dir => '/var/www/cgi-bin/heat', - :script_source_api => '/usr/bin/heat-wsgi-api', - :script_source_cfn => '/usr/bin/heat-wsgi-api-cfn', + :script_source_api => '/usr/lib/python3.9/site-packages/heat/wsgi/api.py', + :script_source_cfn => '/usr/lib/python3.9/site-packages/heat/wsgi/cfn.py', } end end