~niedbalski/charms/trusty/openstack-dashboard/next

« back to all changes in this revision

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

  • Committer: Edward Hope-Morley
  • Date: 2014-02-20 18:25:58 UTC
  • mfrom: (23.2.8 openstack-dashboard)
  • Revision ID: edward.hope-morley@canonical.com-20140220182558-v7pxp37bt3ofgklw
[yolanda] sync charmhelpers and add syslog support

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