You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After log rotation with logrotated, the postrotate option in this cookbook does a reload of the service daemon. However, we've found that this leaves stale filehandles on the system, and it appears as if the daemon is no longer working, as there is no longer logging happening during chef runs.
Steps to Reproduce:
Setup logrotated to rotate the chef-client's log file every night (see sample).
chef-client daemon rotates its log file and service resumes normally.
Actual Result:
We're seeing stale filehandles. It also appears as if the chef client stop checking in.
I've identified a solution that works, but this requires us to drop our own chef-client restart script. I think this should go into the template used in this cookbook instead.
Add to /etc/init.d/chef-client the following, which sends the -TERM option to the daemon restart:
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.
Cookbook version
8.1.7
Chef-client version
12.14.89
Platform Details
Redhat and CentOS 6 & 7
Scenario:
After log rotation with logrotated, the postrotate option in this cookbook does a
reload
of the service daemon. However, we've found that this leaves stale filehandles on the system, and it appears as if the daemon is no longer working, as there is no longer logging happening during chef runs.Steps to Reproduce:
Setup logrotated to rotate the chef-client's log file every night (see sample).
Expected Result:
chef-client daemon rotates its log file and service resumes normally.
Actual Result:
We're seeing stale filehandles. It also appears as if the chef client stop checking in.
I've identified a solution that works, but this requires us to drop our own chef-client restart script. I think this should go into the template used in this cookbook instead.
Add to /etc/init.d/chef-client the following, which sends the
-TERM
option to the daemon restart:Then change the postrotate option to
/etc/init.d/chef-client graceful-restart >/dev/null || :
The text was updated successfully, but these errors were encountered: