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

Chef postrotate command does not release log files #369

Open
eherot opened this issue Mar 1, 2016 · 4 comments
Open

Chef postrotate command does not release log files #369

eherot opened this issue Mar 1, 2016 · 4 comments
Labels
Status: Good First Issue An issue ready for a new contributor. Type: Bug Does not work as expected.

Comments

@eherot
Copy link

eherot commented Mar 1, 2016

16:57:29 (0) eherot: ~
$ pgrep -l chef
32051 chef-client

16:57:34 (0) eherot: ~
$ sudo lsof -p 32051 | grep deleted
chef-clie 32051 root    7u   CHR  136,0       0t0        3 /dev/pts/0 (deleted)
chef-clie 32051 root   10w   REG  202,1  51714790   177895 /var/log/chef/client.log.1 (deleted)
chef-clie 32051 root   12w   REG  202,1 113543697   131390 /var/log/chef/client.log.1 (deleted)
chef-clie 32051 root   13w   REG  202,1  86169305   148256 /var/log/chef/client.log.1 (deleted)

16:57:48 (0) eherot: ~
$ sudo /etc/init.d/chef-client reload
 * Reloading chef-client chef-client                                                                                                                          [ OK ]

16:58:02 (0) eherot: ~
$ sudo lsof -p 32051 | grep deleted
chef-clie 32051 root    7u   CHR  136,0       0t0        3 /dev/pts/0 (deleted)
chef-clie 32051 root   10w   REG  202,1  51714790   177895 /var/log/chef/client.log.1 (deleted)
chef-clie 32051 root   12w   REG  202,1 113543697   131390 /var/log/chef/client.log.1 (deleted)
chef-clie 32051 root   13w   REG  202,1  86169305   148256 /var/log/chef/client.log.1 (deleted)

This is most likely related to chef/chef#3435 but it would still be nice if this cookbook could include a workaround so that these files do not stick around forever on my system until this 9-months-old-and-counting bug is fixed.

@cachamber
Copy link
Contributor

It's the same bug, we ended up wrapping chef-client and overriding the default['chef_client']['log_rotation']['postrotate'] to restart instead of reload.

@eherot
Copy link
Author

eherot commented Mar 1, 2016

Similar: We switched to copytruncate.

@tas50 tas50 added the bug label Jul 14, 2016
@tas50 tas50 removed the bug label Aug 2, 2016
@tas50 tas50 added the Type: Bug Does not work as expected. label Dec 6, 2016
@tas50
Copy link
Contributor

tas50 commented Aug 11, 2017

@eherot Any chance you want to open a PR to change the logrotate config. This would be a nice one to fix.

@tas50
Copy link
Contributor

tas50 commented Sep 9, 2017

I’m adding the Type: Jump In GitHub label to this issue. This is a great issue for someone to get their feet wet with and we’d love a PR to resolves the issue.

@tas50 tas50 added Status: Good First Issue An issue ready for a new contributor. and removed Help: Good First Issue labels Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Good First Issue An issue ready for a new contributor. Type: Bug Does not work as expected.
Development

No branches or pull requests

3 participants