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

Not able to run consul resource consul_definition as root:root #372

Closed nidhishopback closed 7 years ago

nidhishopback commented 7 years ago

Hi,

I am facing an issue related to config file permissions. I have overridden the default user of config and service to 'root' in wrapper cookbook :

override['consul']['config']['owner'] = 'root'
override['consul']['config']['group'] = 'root'
override['consul']['service_user'] = 'root'
override['consul']['service_group'] = 'root'

Still, on running chef-client, it looks for consul user to add a service config :(

* file[/etc/consul/conf.d/chef-client.json] action create
      * cannot determine user id for 'consul', does the user exist on this system?
      ================================================================================
      Error executing action `create` on resource 'file[/etc/consul/conf.d/chef-client.json]'
      ================================================================================

      Chef::Exceptions::UserIDNotFound
      --------------------------------
      cannot determine user id for 'consul', does the user exist on this system?

Can you please suggest what I am missing here to have my config files owned by root? Is it mandatory to have consul username and group created even if I am running the service and config by root user?

rollbrettler commented 7 years ago

@nidhishopback Should work with the latests master branch since https://github.com/johnbellone/consul-cookbook/pull/362 got merged.

johnbellone commented 7 years ago

Please re-open if #362 does not solve this issue.

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.