Re: Does NSD delay re-opening of its log file?

Anand Buddhdev <[email protected]>
Newsgroups gmane.network.dns.nsd.general
Message-ID <[email protected]>
On 20/02/2017 09:06, W.C.A. Wijngaards wrote:

Hi Wouter,

> 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.

This is probably right. When looking at the log files around this time,
it looks like NSD was still busy applying an XFR and reloading a zone,
so it still keep writing to the old log file. But logrotate doesn't know
this, so it starts compressing the old log file.

Logrotate has an option called "delaycompress" that will not compress
the rotated log file. It will only compress it the following day. I
could use this, as disk space isn't a problem for us.

I could add a delay to the compress program, but it would apply to all
logs, so it's not ideal.

I could also add a delay after the call to "nsd-control log_reopen".
I'll think about this, and see what the best solution is.

> Or maybe make log_reopen wait until the reopen has finished, not sure
> how to accomplish that...

Well, if a process receives a command, such as "log_reopen" can it not
report back when it has actually done that?

Regards,
Anand

_______________________________________________
nsd-users mailing list
[email protected]
https://open.nlnetlabs.nl/mailman/listinfo/nsd-users
signature.asc (application/pgp-signature, 898 B)
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQJEBAEBCAAuFiEEmW/UuRJdDOvjJh4cFeCjJQzJKgUFAlisEegQHGFuYW5kYkBy
aXBlLm5ldAAKCRAV4KMlDMkqBcUaEACfxYjhKTS3YZJcCz4suM+AopXSfFy2PUET
1vs59J1SqHu47W8wZL4DzLwXMP5qNL6APuCQfHkefLGeNYtN7Fre9oGAf0/b9kmR
RxoAPWGZ867N6ufpsSGHEKn63S4k+28iVEuV1GudQo8KRxhIAKNrAahWXwfYJGnX
Z196PhZbczCQ+mOY49S1rCnUIxLRQxC9NV9HQhWV6C9QfP/t76MichEFxJbSQyhn
N5rRm4ca5U2kujxq9A9f9ka8exKy+/sFpDssMsRHdshK0Ecc9z2jNoa3/bRsxScC
eNIFFsupT3qS1XxqHIAvuGFwBz4y022jflOB8jGBmFqbMf83wyzT3Vz2ym2z3Nv8
PMG3LSEGwTnt1HAFgzIHyuC4SANcm4QkpFXelTgwtGvwfAp79P2bpok9BMzsfFyh
AuKsp5aiZYB2azjsT5Ci/qbTfOQuLaS6S0mxgtKddIViuJ8AmC8Mjh4gHCY6OJ6Y
JnQ2WZgyV4hGmT5tAqatHCyzIYHWKV0wSwVFAFMbuB8dXt/+J2FjJ+EokNSa1AEO
x+fI0M44bcJKRVZiOi84nNF/GNGmZIosbrsIvIqe1AhDktg1lAyt8QMXNd56UIjP
60oFa9rRjg+Mj+DIsw9njDX072P35o8RQAw3z6MMwHC+wbbTZmTYIEijFOF1fJ0k
9MG5/Z0IEA==
=vrJs
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.