-
-
Notifications
You must be signed in to change notification settings - Fork 883
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
log_dir works in vhost context, but not in main context #895
Comments
You mean I see what you're saying tho. it's getting pulled directly from params.pp, so config.pp override isn't being looked at. This is a good one, I'll work on a PR to fix this. https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/params.pp#L98-L100 |
I'm proposing one fix for this, but would like some input from others about whether there's a better way to accomplish this. It works in my tests if you'd like to test it out as well. |
Yes, you got it right. It is log_dir. Thanks a lot for your work on that one. With your change, will it still be possible to override it? I think I should be able to test your proposed code next week. Also, could you demystify something for me: I don't know if that's the case when setting the configs in the classes, but when using Hiera, some parameters are nginx::paramX and some others are nging::config::paramY. Is there a reason why? Example from my config: Directly under nginx::
Needs a "config" before:
|
As far as the history on which configs are in nginx::config, I think the idea was to reduce the clutter in params, as well as to separate the parameters configuring the module itself (i.e., where nginx is installed from, say), vs. the parameters that relate to configuring nginx itself. You don't have to use hiera, but you may need to use the weird pattern used in There was also at one point an attempt to move to 'puppet-module-data' pattern; this text from an old version of #501 also has some background. In any event, the module is now maintained by Voxpupuli, which maintains it on a volunteer basis. I don't directly work with them, but have been trying to help make some incremental improvements to the module lately. @bastelfreak and I did discuss trying to clean up some of the cruft again, and simplify the namespaces a bit. Pull requests are always welcome. You're also welcome to join the discussion in #voxpupuli on the Puppet Community Slack or on IRC (chat.freenode.net). |
fix for log_dir not being honored (#895)
I understand the history a bit, but I don't really understand how to figure out when to use nginx::config::param and when to use nginx::param except trial and error. To me, nginx::server_tokens is an nginx config, not a module parameter (like manage_repo for example). I looked at the code but couldn't really figure it out. |
Yeah, you pretty much have to look at the code, but because of the history, the code is a bit mixed up too, and sometimes it's hard to figure out. It's a known issue that, while the vhost and location resources have parameters documented at the top of the manifests, the README, init.pp and config.pp don't include docs for all the top level config params, which is obviously not a good situation. #451 is an old PR that's by now way out of date, that was attempting to address some of this. I do hope we can make some improvements in this area. There's been some discussion of exactly how (whether puppet-strings is ready and whether we'll be using it or not), but so far, I'm leaning towards just fixing the docs by hand for now, which is do-able, but will be quite labor intensive. |
btw, patch for my fix. It's also been merged into master, so you could try just cloning current master into your modules directory, which will get you some of the other fixes mentioned as well. https://patch-diff.githubusercontent.com/raw/voxpupuli/puppet-nginx/pull/904.diff |
Thanks, I have 2 questions:
PS: what timezone are you in? (Eastern for me) |
Yeah, like I said, the module is in kind of a convoluted state at this point. As I understand it, the stuff listed in But like I was saying, basically, anything that's not about managing the package or service was moved to the I'm in Pacific timezone. |
And you can see the commit history here: You can see release history here: |
Thanks for the links to releases. I guess that a release is what is pushed to the forge? Regarding the nginx::config namespace, I understand what you are saying but it doesn't seem to be consistent with the code, unless I've got something wrong in my config or there have been many changes in master since the release. Here's what I have in the nginx::config namespace:
nginx::worker_processes: 'auto'
|
#904 is merged. |
FYI: I tried to move all my configs, but 2 can't (running 0.5.0 by the way): If I remove the '::config' from these two, the value it's like if I had put nothing:
Thanks, |
fix for log_dir not being honored (voxpupuli#895)
fix for log_dir not being honored (voxpupuli#895)
Hi,
I defined nginx::config::conf_dir and it works perfectly for vhosts (it puts access log in $log_dir/vhostname.access.log), but if we also want to use a different path for the base nginx logs, we have to explicitely define them, even when nginx::config::conf_dir is defined.
nginx::config::log_dir: '/var/opt/rh/rh-nginx18/log/nginx'
nginx::http_access_log: '/var/opt/rh/rh-nginx18/log/nginx/access.log'
nginx::nginx_error_log: '/var/opt/rh/rh-nginx18/log/nginx/error.log'
The text was updated successfully, but these errors were encountered: