From a6d984e9ada66834bad670d89db44748bdd00c55 Mon Sep 17 00:00:00 2001 From: Ante Karamatic Date: Sun, 16 Feb 2014 21:42:14 +0100 Subject: [PATCH] Use new ha ssl port configuration (HAproxy in front of Apache) --- hooks/glance_contexts.py | 7 ++++--- hooks/glance_relations.py | 1 + revision | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hooks/glance_contexts.py b/hooks/glance_contexts.py index 48824a4a..62e9c769 100644 --- a/hooks/glance_contexts.py +++ b/hooks/glance_contexts.py @@ -10,8 +10,8 @@ from charmhelpers.contrib.openstack.context import ( ) from charmhelpers.contrib.hahelpers.cluster import ( + determine_apache_port, determine_api_port, - determine_haproxy_port, ) @@ -58,11 +58,12 @@ class HAProxyContext(OSContextGenerator): specific to this charm. Also used to extend glance-api.conf context with correct bind_port ''' - haproxy_port = determine_haproxy_port(9292) + haproxy_port = 9292 + apache_port = determine_apache_port(9292) api_port = determine_api_port(9292) ctxt = { - 'service_ports': {'glance_api': [haproxy_port, api_port]}, + 'service_ports': {'glance_api': [haproxy_port, apache_port]}, 'bind_port': api_port, } return ctxt diff --git a/hooks/glance_relations.py b/hooks/glance_relations.py index fae540f4..26f1073e 100755 --- a/hooks/glance_relations.py +++ b/hooks/glance_relations.py @@ -225,6 +225,7 @@ def config_changed(): @hooks.hook('cluster-relation-changed') @restart_on_change(restart_map(), stopstart=True) def cluster_changed(): + configure_https() CONFIGS.write(GLANCE_API_CONF) CONFIGS.write(HAPROXY_CONF) diff --git a/revision b/revision index c748b568..0d667b5e 100644 --- a/revision +++ b/revision @@ -1 +1 @@ -147 +148