Cleanup cinder paste configuration for ssl.

Newton-only.

Now that wsgi is used[1] we no longer have to configure the ssl in the
paste-api.conf file.

We remove it and revert it back to mitaka's values so that the cinder
package upgrade replace the file with the new version.

We add a basic check of the expected change to minimize the chance to
override real user change.

The sed is necessary to remove the last empty in order for the file's
md5 is the same as the original[2]

[1] https://review.openstack.org/#/q/topic:deprecate_cinder_ssl
[2] nice table of %config tag http://people.ds.cam.ac.uk/jw35/docs/rpm_config.html

Closes-Bug: #1685750

Change-Id: I53fee2314830193ecfdd8a1d92508ff855450611
This commit is contained in:
Sofer Athlan-Guyot 2017-04-24 14:40:32 +02:00 committed by Athlan-Guyot sofer
parent 0eb81a20ce
commit 016140bc9e
1 changed files with 10 additions and 0 deletions

View File

@ -102,6 +102,16 @@ fi
# Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1669714
special_case_ovs_upgrade_if_needed
if grep -q '^pipeline = ssl_header_handler faultwrap osvolumeversionapp' /etc/cinder/api-paste.ini; then
# Revert back cinder SSL setup as it's going to be handled by wsgi.
echo "Removing default ssl configuration for rpm configuration upgrade."
crudini --del /etc/cinder/api-paste.ini filter:ssl_header_handler
crudini --set /etc/cinder/api-paste.ini pipeline:apiversions pipeline 'cors http_proxy_to_wsgi faultwrap osvolumeversionapp'
## remove empty line at eof if present.
sed -i '$ { /^$/d }' /etc/cinder/api-paste.ini
fi
yum -y install python-zaqarclient # needed for os-collect-config
yum -y -q update