From ab45982924f4ac8f8554eaf576561e85d0599578 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 3 Nov 2021 21:10:10 +0900 Subject: [PATCH] Prepare to update default of ::wsgi::apache::ssl Currently the ::wsgi::apache::ssl parameters have inconsistent default values. Some parameters default to true while the other default to false. Based on the following points, false is considered to be the more reasonable default. - Usage of SSL is optional and is not always required - There are other methods(like load-balancer) to implement SSL termination - Enabling SSL doesn't work with the default values currently defined, and requires additional parameters like ssl_cert. - false is the default value defined in the base implementation in puppet-openstacklib. This change is the preparation to change the default value, and introduces a warning message to make users aware of the future change. Change-Id: I39cacc8244fa8984e5a1f16eec407118dc1a67f3 --- manifests/wsgi/apache_api.pp | 11 ++++++++--- manifests/wsgi/apache_metadata.pp | 11 ++++++++--- ...prepare-to-change-apache-ssl-571d079722b20702.yaml | 9 +++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/prepare-to-change-apache-ssl-571d079722b20702.yaml diff --git a/manifests/wsgi/apache_api.pp b/manifests/wsgi/apache_api.pp index be39f7a83..19832dc52 100644 --- a/manifests/wsgi/apache_api.pp +++ b/manifests/wsgi/apache_api.pp @@ -110,7 +110,7 @@ class nova::wsgi::apache_api ( $api_port = 8774, $bind_host = undef, $path = '/', - $ssl = true, + $ssl = undef, $workers = $::os_workers, $ssl_cert = undef, $ssl_key = undef, @@ -129,10 +129,15 @@ class nova::wsgi::apache_api ( $vhost_custom_fragment = undef, ) { + if $ssl == undef { + warning('Default of the ssl parameter will be changed in a future release') + } + $ssl_real = pick($ssl, true) + include nova::params include apache include apache::mod::wsgi - if $ssl { + if $ssl_real { include apache::mod::ssl } @@ -147,7 +152,7 @@ class nova::wsgi::apache_api ( path => $path, priority => $priority, servername => $servername, - ssl => $ssl, + ssl => $ssl_real, ssl_ca => $ssl_ca, ssl_cert => $ssl_cert, ssl_certs_dir => $ssl_certs_dir, diff --git a/manifests/wsgi/apache_metadata.pp b/manifests/wsgi/apache_metadata.pp index 144e58bc5..cbb976900 100644 --- a/manifests/wsgi/apache_metadata.pp +++ b/manifests/wsgi/apache_metadata.pp @@ -96,7 +96,7 @@ class nova::wsgi::apache_metadata ( $api_port = 8775, $bind_host = undef, $path = '/', - $ssl = true, + $ssl = undef, $workers = $::os_workers, $ssl_cert = undef, $ssl_key = undef, @@ -116,10 +116,15 @@ class nova::wsgi::apache_metadata ( $vhost_custom_fragment = undef, ) { + if $ssl == undef { + warning('Default of the ssl parameter will be changed in a future release') + } + $ssl_real = pick($ssl, true) + include nova::params include apache include apache::mod::wsgi - if $ssl { + if $ssl_real { include apache::mod::ssl } @@ -142,7 +147,7 @@ class nova::wsgi::apache_metadata ( path => $path, priority => $priority, servername => $servername, - ssl => $ssl, + ssl => $ssl_real, ssl_ca => $ssl_ca, ssl_cert => $ssl_cert, ssl_certs_dir => $ssl_certs_dir, diff --git a/releasenotes/notes/prepare-to-change-apache-ssl-571d079722b20702.yaml b/releasenotes/notes/prepare-to-change-apache-ssl-571d079722b20702.yaml new file mode 100644 index 000000000..48afe0141 --- /dev/null +++ b/releasenotes/notes/prepare-to-change-apache-ssl-571d079722b20702.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + Default value of the following two parameters will be changed from + ``true`` to ``false`` in a future release. Make sure the parameter is set + to the desired value. + + - ``nova::wsgi::apache_api::ssl`` + - ``nova::wsgi::apache_metadata::ssl``