diff options
| -rw-r--r-- | provider_base/lib/macros/haproxy.rb | 8 | ||||
| -rw-r--r-- | provider_base/services/mx.json | 2 | ||||
| -rw-r--r-- | provider_base/services/webapp.json | 2 | 
3 files changed, 8 insertions, 4 deletions
diff --git a/provider_base/lib/macros/haproxy.rb b/provider_base/lib/macros/haproxy.rb index c0f9ede5..602ae726 100644 --- a/provider_base/lib/macros/haproxy.rb +++ b/provider_base/lib/macros/haproxy.rb @@ -39,6 +39,10 @@ module LeapCli        # create the first pass of the servers hash        servers = node_list.values.inject(Config::ObjectList.new) do |hsh, node| +        # make sure we have a port to talk to +        unless accept_ports[node.name] +          error "haproxy needs a local port to talk to when connecting to #{node.name}" +        end          weight = default_weight          try {            weight = local_weight if self.location.name == node.location.name @@ -46,7 +50,7 @@ module LeapCli          hsh[node.name] = Config::Object[            'backup', false,            'host', 'localhost', -          'port', accept_ports[node.name] || 0, +          'port', accept_ports[node.name],            'weight', weight          ]          if node.services.include?('couchdb') @@ -66,4 +70,4 @@ module LeapCli      end    end -end
\ No newline at end of file +end diff --git a/provider_base/services/mx.json b/provider_base/services/mx.json index 1f0e613e..32a93638 100644 --- a/provider_base/services/mx.json +++ b/provider_base/services/mx.json @@ -7,7 +7,7 @@    "haproxy": {      "couch": {        "listen_port": 4096, -      "servers": "= haproxy_servers(nodes_like_me[:services => :couchdb], stunnel.clients.couch_client)" +      "servers": "= haproxy_servers(nodes_like_me[:services => :couchdb], stunnel.clients.couch_client, 5984)"      }    },    "couchdb_leap_mx_user": { diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json index 1b550af9..c1e3791f 100644 --- a/provider_base/services/webapp.json +++ b/provider_base/services/webapp.json @@ -39,7 +39,7 @@    "haproxy": {      "couch": {        "listen_port": 4096, -      "servers": "= haproxy_servers(nodes_like_me[:services => :couchdb], stunnel.clients.couch_client, global.services[:couchdb].couch.port)" +      "servers": "= haproxy_servers(nodes_like_me[:services => :couchdb], stunnel.clients.couch_client, global.services[:couchdb].couch.port, 5984)"      }    },    "definition_files": {  | 
