~james-page/charms/precise/nova-cloud-controller/pre-check

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/hahelpers/cluster.py

  • Committer: James Page
  • Date: 2014-02-19 11:02:03 UTC
  • mfrom: (62.1.6 tls-ha)
  • Revision ID: james.page@canonical.com-20140219110203-5z78s29rp3cl55vq
[ivoks] Re-order port-pipeline to ensure end-to-end SSL

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
    return public_port - (i * 10)
127
127
 
128
128
 
129
 
def determine_haproxy_port(public_port):
 
129
def determine_apache_port(public_port):
130
130
    '''
131
 
    Description: Determine correct proxy listening port based on public IP +
132
 
    existence of HTTPS reverse proxy.
 
131
    Description: Determine correct apache listening port based on public IP +
 
132
    state of the cluster.
133
133
 
134
134
    public_port: int: standard public port for given service
135
135
 
136
136
    returns: int: the correct listening port for the HAProxy service
137
137
    '''
138
138
    i = 0
139
 
    if https():
 
139
    if len(peer_units()) > 0 or is_clustered():
140
140
        i += 1
141
141
    return public_port - (i * 10)
142
142