diff --git a/hooks/lib/apache_utils.py b/hooks/lib/apache_utils.py index 4c05f94..38eb6c7 100644 --- a/hooks/lib/apache_utils.py +++ b/hooks/lib/apache_utils.py @@ -30,11 +30,9 @@ RELOAD_CHECK = "To activate the new configuration" def is_apache24(): try: version = subprocess.check_output(['a2query', '-v']) - if version.startswith('2.4'): - return True - else: - return False - except subprocess.CalledProcessError: + return version.startswith('2.4') + except (subprocess.CalledProcessError, OSError): + # Catch OSError just in case apache2 not yet installed return False diff --git a/templates/havana/proxy-server.conf b/templates/havana/proxy-server.conf index b248113..36e4587 100644 --- a/templates/havana/proxy-server.conf +++ b/templates/havana/proxy-server.conf @@ -49,15 +49,15 @@ delay_auth_decision = {{ delay_auth_decision|lower }} {% if os_release != 'essex' %}signing_dir = /etc/swift{% endif %} cache = swift.cache -#[filter:s3token] -#paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory -#service_host = {{ keystone_host }} -#service_port = {{ service_port }} -#auth_port = {{ auth_port }} -#auth_host = {{ keystone_host }} -#auth_protocol = {{ auth_protocol }} -#auth_token = {{ admin_token }} -#admin_token = {{ admin_token }} +[filter:s3token] +paste.filter_factory = keystone.middleware.s3_token:filter_factory +service_host = {{ keystone_host }} +service_port = {{ service_port }} +auth_port = {{ auth_port }} +auth_host = {{ keystone_host }} +auth_protocol = {{ auth_protocol }} +auth_token = {{ admin_token }} +admin_token = {{ admin_token }} [filter:swift3] {% if os_release == 'essex' %}use = egg:swift#swift3{% else %}use = egg:swift3#swift3