sous-chefs / consul

Development repository for the consul cookbook
https://supermarket.chef.io/cookbooks/consul
Apache License 2.0
192 stars 244 forks source link

consul acl resource is not defaulting to configured consul url and port #338

Closed claudio-viola closed 7 years ago

claudio-viola commented 8 years ago

https://github.com/johnbellone/consul-cookbook/blob/master/libraries/consul_acl.rb#L20 it should be 'http://#{node['consul']['config']['client_addr']:#{node['consul']['config']['ports']['http']}'

legal90 commented 7 years ago

Hi @claudio-viola Sorry, but it should not be so. url attribute of consul_asc resource defines the URL which will be used for sending the request. It accepts any TCP socket listened by a consul agent (it's not required to be local).

However, both of node['consul']['config']['client_addr'] and node['consul']['config']['ports']['http'] define how the local consul agent should be configured in case we want to set it up. Those are a local address and port which the consul agent will use for listening.

Overall, node['consul']['config']['client_addr'] defaults to "0.0.0.0" which is OK for listening, but couldn't be used as a destination address for sending reqests (as consul_asc needs).

lock[bot] commented 4 years ago

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.