From 0f082bc1c82af97c105bc556bf5d29f7b32c2558 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 20 Aug 2025 20:12:51 +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: Ib724af2a20677937d7e9e9b417731296b64c7279 Signed-off-by: Takashi Kajinami --- manifests/params.pp | 4 ++++ manifests/wsgi/apache.pp | 5 ++--- spec/classes/keystone_wsgi_apache_spec.rb | 8 +++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index f0865b8ec..0c6340256 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,6 +4,8 @@ class keystone::params { include openstacklib::defaults + $pyver3 = $openstacklib::defaults::pyver3 + $client_package_name = 'python3-keystoneclient' $user = 'keystone' $group = 'keystone' @@ -17,6 +19,7 @@ class keystone::params { $package_name = 'keystone' $service_name = 'keystone' $keystone_wsgi_script_path = '/usr/lib/cgi-bin/keystone' + $keystone_wsgi_script_source = '/usr/bin/keystone-wsgi-public' $python_memcache_package_name = 'python3-memcache' $python_ldappool_package_name = 'python3-ldappool' } @@ -24,6 +27,7 @@ class keystone::params { $package_name = 'openstack-keystone' $service_name = 'openstack-keystone' $keystone_wsgi_script_path = '/var/www/cgi-bin/keystone' + $keystone_wsgi_script_source = "/usr/lib/python${pyver3}/site-packages/keystone/wsgi/api.py" $python_memcache_package_name = 'python3-memcached' $python_ldappool_package_name = 'python3-ldappool' } diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 9f621bbba..1296e6ec0 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -166,7 +166,7 @@ class keystone::wsgi::apache ( $wsgi_application_group = '%{GLOBAL}', $wsgi_pass_authorization = 'On', $wsgi_chunked_request = undef, - $wsgi_script_source = '/usr/bin/keystone-wsgi-public', + $wsgi_script_source = $keystone::params::keystone_wsgi_script_source, $access_log_file = undef, $access_log_pipe = undef, $access_log_syslog = undef, @@ -179,9 +179,8 @@ class keystone::wsgi::apache ( $request_headers = undef, $vhost_custom_fragment = undef, $custom_wsgi_process_options = {}, -) { +) inherits keystone::params{ include keystone::deps - include keystone::params Anchor['keystone::install::end'] -> Class['apache'] diff --git a/spec/classes/keystone_wsgi_apache_spec.rb b/spec/classes/keystone_wsgi_apache_spec.rb index b8bedd76c..391b9d813 100644 --- a/spec/classes/keystone_wsgi_apache_spec.rb +++ b/spec/classes/keystone_wsgi_apache_spec.rb @@ -31,7 +31,7 @@ describe 'keystone::wsgi::apache' do :wsgi_application_group => '%{GLOBAL}', :wsgi_script_dir => platform_params[:wsgi_script_path], :wsgi_script_file => 'keystone', - :wsgi_script_source => '/usr/bin/keystone-wsgi-public', + :wsgi_script_source => platform_params[:wsgi_script_source], :wsgi_pass_authorization => 'On', :headers => nil, :request_headers => nil, @@ -205,11 +205,13 @@ describe 'keystone::wsgi::apache' do case facts[:os]['family'] when 'Debian' { - :wsgi_script_path => '/usr/lib/cgi-bin/keystone', + :wsgi_script_path => '/usr/lib/cgi-bin/keystone', + :wsgi_script_source => '/usr/bin/keystone-wsgi-public', } when 'RedHat' { - :wsgi_script_path => '/var/www/cgi-bin/keystone', + :wsgi_script_path => '/var/www/cgi-bin/keystone', + :wsgi_script_source => '/usr/lib/python3.9/site-packages/keystone/wsgi/api.py', } end end