Skip to content

Commit

Permalink
nginx config should be provided in the postrotate command
Browse files Browse the repository at this point in the history
otherwise signal is sent to the nginx with the default configuration
file which causes error.log being created in the wrong location.
Also if SELinux is turned on the box, logrotate breaks due to the fact
that the logrotate_exec_t service can not modify files labeled usr_t.
Default error.log locates in the
/opt/opscode/embedded/nginx/logs/error.log and labeled as usr_t.
  • Loading branch information
mhorbul committed Aug 2, 2016
1 parent 1f1c543 commit f133f5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Chef Server Changelog

## (unknown)

### private-chef-cookbooks/private-chef
- Fix logrotate configuration to make it work with SELinux enabled.

## [12.8.0](https://github.com/chef/chef-server/tree/12.8.0) (2016-07-06)
[Full Changelog](https://github.com/chef/chef-server/compare/12.7.0...12.8.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
group 'root'
mode '0644'
variables(node['private_chef']['nginx'].to_hash.merge(
'postrotate' => '/opt/opscode/embedded/sbin/nginx -s reopen',
'postrotate' => "/opt/opscode/embedded/sbin/nginx -c #{nginx_config} -s reopen",
'owner' => OmnibusHelper.new(node).ownership['owner'],
'group' => OmnibusHelper.new(node).ownership['group']
))
Expand Down

0 comments on commit f133f5b

Please sign in to comment.