Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When service_user is root and config user is consul, cookbook fails #405

Closed
jasonmcintosh opened this issue Jan 31, 2017 · 2 comments · Fixed by #446
Closed

When service_user is root and config user is consul, cookbook fails #405

jasonmcintosh opened this issue Jan 31, 2017 · 2 comments · Fixed by #446

Comments

@jasonmcintosh
Copy link

Consul 2.3.0 fails if the service_user is root, and the config user isn't set or is set to consul. This causes the poise user to not be created, causing directory configuration to fail. This is primarily when migrating from a 2.1.3 to 2.3.0 release. A few possible fixes off top of head...

Change default recipe so it'll create the user if either is false.

not_if { node['consul']['service_user'] == 'root' }
to be
not_if { node['consul']['service_user'] == 'root' } and { node['consul']['config']['owner'] == 'root' }

Default config user to the service user

Change attributes file to do:
default['consul']['config']['owner'] = default['consul']['service_user'] or similar.

@legal90
Copy link
Contributor

legal90 commented May 31, 2017

#446 will fix that issue.
A node attribute ['consul']['config']['owner'] will not be defined, so the dafault owner of Consul config will be a value of the node attribute ['consul']['service_user'] (which is "root" in your case).

https://github.com/johnbellone/consul-cookbook/blob/eebc1299cefb6d766218904ea372566cc84bf373/libraries/consul_config.rb#L23

@lock
Copy link

lock bot commented Apr 25, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants