Closed nitinmohan87 closed 10 years ago
Ok. I was wrong in saying /usr/local//etc/haproxy
is not a valid path. Learned something new.
But the actual problem is the haproxy.cfg
file is not generated inside /usr/local/etc/haproxy
. Its always generated in /etc/haproxy
due to this - https://github.com/hw-cookbooks/haproxy/blob/master/providers/default.rb#L4
So if we are installing from source, the LWRP must update the config directory path to point to /usr/local/etc/haproxy
instead of the default /etc/haproxy
.
:+1: I'm also running into this bug. But I think there should be a discrete PR to fix this instead of a 'various' fixes request like #68. It may get merged quicker.
If you use wrapper cookbook you can override default attribute from install_source recipe:
node.override['haproxy']['conf_dir'] = '/etc/haproxy'
Not sure if that is the best way but it works
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
In the install_source recipe, the haproxy configuration directory is set to
/usr/local//etc/haproxy/haproxy.cfg
which does not make sense. The bug is here in this line - https://github.com/hw-cookbooks/haproxy/blob/master/recipes/install_source.rb#L34In the attributes file
node['haproxy']['source']['prefix']
is set to/usr/local
node['haproxy']['conf_dir']
is set to/etc/haproxy
Hence the resulting string from line 34 is
/usr/local//etc/haproxy
which is not a vaild path.I don't understand why the
/usr/local
prefix is added to the configuration directory. The configuration directory could just be in the path specified bynode['haproxy']['conf_dir']
.