You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
claudio-viola
changed the title
consul acl is not defaulting to configured consul url and port
consul acl resource is not defaulting to configured consul url and port
Jul 24, 2016
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).
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']}'
The text was updated successfully, but these errors were encountered: