engineyard / ey-cookbooks-stable-v6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HAProxy health check does not support multiple vhosts

sfnelson opened this issue · comments

https://github.com/engineyard/ey-cookbooks-stable-v6/blob/next-release/cookbooks/haproxy/recipes/configure.rb#L45

haproxy_httpchk_host = app.vhosts.first.domain_name.empty? ? nil : app.vhosts.first.domain_name

This line configures HAProxy to use the domain name configured in the app's vhost, but the documentation for Domain Name states:

Enter comma-separated values. Wildcards and regular expressions are allowed.

In practice, this value is a list of space-separated strings intended for the nginx server_name directive, which can include regexes.

I'm not sure how the HAProxy recipe should deal with regex values, but at least it should check for _ and handle multiple values appropriately.

This issue has (finally!) been prioritized and the fix will be part of the next release, aimed at happening during the current month.