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

Circuler dependency #656

Closed
b4ldr opened this issue Jul 3, 2015 · 1 comment
Closed

Circuler dependency #656

b4ldr opened this issue Jul 3, 2015 · 1 comment
Labels
bug Something isn't working needs-feedback Further information is requested

Comments

@b4ldr
Copy link
Member

b4ldr commented Jul 3, 2015

I have just started to use this module on freebsd and have noticed a circuler dependency. On FreeBSD the log dir /var/log/nginx/ does not exist so trying to start the service fails and the first (and susequent) puppet runs fail with the following error

Error: Could not start Service[nginx]: Execution of '/usr/local/etc/rc.d/nginx onestart' returned 1: Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/var/log/nginx/error.log" failed (2: No such file or directory)
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Starting nginx.
nginx: [emerg] open() "/var/log/nginx/error.log" failed (2: No such file or directory)
/usr/local/etc/rc.d/nginx: WARNING: failed to start nginx
Error: /Stage[main]/Nginx::Service/Service[nginx]/ensure: change from stopped to running failed: Could not start Service[nginx]: Execution of '/usr/local/etc/rc.d/nginx onestart' returned 1: Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/var/log/nginx/error.log" failed (2: No such file or directory)
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Starting nginx.
nginx: [emerg] open() "/var/log/nginx/error.log" failed (2: No such file or directory)
/usr/local/etc/rc.d/nginx: WARNING: failed to start nginx

The directory is created[1] however the package installation is set to notify the service[2] and the config class depends on the package instalation[3] and so we never get to create the logdir. I will send a patch to remove the notiofy. I think this is safe as a) the pakage should take care of restarting the service; b) its probably best to only start the service are config class has been run.

[1]https://github.com/jfryman/puppet-nginx/blob/master/manifests/config.pp#L212-214
[2]https://github.com/jfryman/puppet-nginx/blob/master/manifests/init.pp#L216
[3]https://github.com/jfryman/puppet-nginx/blob/master/manifests/init.pp#L289

@3flex 3flex added the bug Something isn't working label Jul 8, 2015
@3flex 3flex added the needs-feedback Further information is requested label Aug 12, 2015
@3flex
Copy link
Contributor

3flex commented Feb 3, 2016

Closing for now. If we get more information we can reopen. Thanks!

@3flex 3flex closed this as completed Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants