~ibm-charms/charms/trusty/nova-compute-power/trunk

« back to all changes in this revision

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

  • Committer: Edward Hope-Morley
  • Date: 2014-03-26 18:08:46 UTC
  • mfrom: (55.1.1 nova-compute.lp1273067)
  • Revision ID: edward.hope-morley@canonical.com-20140326180846-o2mo693uow2urlpj
[hopem] Added support for ceph-client logging to syslog

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