Re: Does NSD delay re-opening of its log file?
"W.C.A. Wijngaards" <[email protected]>
| Newsgroups | gmane.network.dns.nsd.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Anand, On 18/02/17 10:53, Anand Buddhdev wrote: > I've observed something strange on some of our busy servers. Logrotate > reports something like this: > > /etc/cron.daily/logrotate: > > gzip: stdin: file size changed while zipping > > So here's what logrotate does: > > 1. mv nsd.log nsd.log.old > > 2. runs "nsd-control log_reopen" > > 3. gzip nsd.log.old > > Occasionally, when performing step 3, gzip complains that the input file > size changed, meaning that NSD was still writing to it. > > Is it possible that NSD delays re-opening of the log file? It communicates the reopen internally over the pipes. It could be race condition, where the gzip starts before the reopen has finished. sleep 1 or sleep 2 before calling gzip would solve that. Or maybe make log_reopen wait until the reopen has finished, not sure how to accomplish that... Best regards, Wouter > > Regards, > Anand > _______________________________________________ > nsd-users mailing list > [email protected] > https://open.nlnetlabs.nl/mailman/listinfo/nsd-users > _______________________________________________ nsd-users mailing list [email protected] https://open.nlnetlabs.nl/mailman/listinfo/nsd-users
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYqqOTAAoJEJ9vHC1+BF+NsuIP/3sj45fNh9EMAcupQXPpn+pB Bc0SH1ROQuO23AbkrXMNT84MrUO46EBvqY7yyIKOTMBAtKMTNd/tnFrFsge6V+0b D6hac9/iTWIX7cCw92nso+XfeAMi4JJUqwMQClYk3nJr9aiuxlxDwG5/7E4B7YqW yBRVp4k74FAT+xg5tdUdoYCCW+AjUDKOQ8S0jnTVEw62aKAcmVJQBgx0F4+PB3q9 0qi4vrN9oRhB9Ai7EcE+ocJ/PFNhrPKXkr4OWWmYQbA05Ar0UDbQxxJzuDrCOKWr 2mrsnJREybWO1tk2XJhYdFR/7y/842dCoPp7eXhSHu/gIIhhdRwvtiHDC6ggXxKT ueiShsC65JYQ+tNDSSiT6nWWkcu79/5rfmbPSmxKyL+lruG1CwjaPT7kmxJ12S3b V3xyAfuhbptXficWCTfhkEF17fnm5ymT8/Z/0+eIeEjgomJfUkGm6pngReif7Yxp D6vHSXTbyF9tZgdPRFumPycAm8M7dzTBjRjBF7OV2EIX/1dy/DA1paVOUsSLGGek AAsNifLdP0Lb4IrGNXlFCBGFF0EZKwFTbFLpOadSiHg0zk4Ik0/l5A/4uAyEsPdH gqkbmBbAYXsxIYxBrnmrqE6TcYk8X3nh5mOVVwYOimMivpe8ZLu8/4rdiK+pIWZO wf0SHQQ07j0zW93UXc8E =Xn12 -----END PGP SIGNATURE-----