Closed kusalananda closed 1 year ago
My alternative is, I guess, to restart the Znapzend service when the log rotates, but since this tends to happen on the hour, I don't know how that would affect Znapzend if it's currently sending snapshots (which also happens on the hour in my setup). I'm afraid of interrupting (or worse, corrupting) the snapshotting+send process.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Well, that's one way to handle issues.
@kusalananda please test the #598
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
When rotating Znapzend log files, I've noticed that Znapzend 0.21.1 keeps the current log file opened for writing, even though the file is renamed and compressed, leading to a corrupt rotated log file and lost log entries.
My current setup is FreeBSD 13.1, which uses
newsyslog
to manage log file rotations. I'm using the PID file of Znapzend to send the daemonized process a HUP signal when the log file needs to be rotated, but, as mentioned, this does not quite work as expected.I suggest the daemon should close and re-open the log file when receiving a HUP signal.