Re: logrotate(8) and copytruncate as default

2013-06-29 Thread P J P
- Original Message - > From: Lennart Poettering > Subject: Re: logrotate(8) and copytruncate as default > It will create a new file and rename the old one.     Right, thanks for confirming! Thank you! --- Regards    -Prasad http://feedmug.com -- devel mailing l

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Matthew Miller
On Sat, Jun 29, 2013 at 02:42:11AM +0200, Lennart Poettering wrote: > That's why we are so strong on filtering the dataset when you look at > it. May I recommend watching this video? > https://www.youtube.com/watch?v=i4CACB7paLc I was there at that talk. :) I think the journal is cool. It does gr

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Lennart Poettering
On Sat, 29.06.13 04:46, P J P (pj.pan...@yahoo.co.in) wrote: > >   Hi, > - Original Message - > > From: Lennart Poettering > > Subject: Re: logrotate(8) and copytruncate as default > > > > journald is the only writer, it doesn't need locking. The

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Lennart Poettering
On Fri, 28.06.13 01:17, Jan Kaluza (jkal...@redhat.com) wrote: > > > Why would you want this? I mean, we rate-limit per-service anyway, so > > > the issue of one app flooding evreything else should be mostly > > > non-existant. And hence, what you are asking for is some policy control > > > about

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Lennart Poettering
On Fri, 28.06.13 16:33, Matthew Miller (mat...@fedoraproject.org) wrote: > On Fri, Jun 28, 2013 at 09:48:58PM +0200, Zbigniew Jędrzejewski-Szmek wrote: > > 'uid' as default doesn't make sense, at least with the current way of > > accesing > > logs. It is really nice to be able to view messages ab

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Lennart Poettering
On Fri, 28.06.13 14:46, Matthew Miller (mat...@fedoraproject.org) wrote: > On Fri, Jun 28, 2013 at 07:27:30PM +0200, Zbigniew Jędrzejewski-Szmek wrote: > > Splitting is controlled by SplitMode= > > Controls whether to split up journal files per user. One of "login", > > "uid" and "none". If "l

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread P J P
  Hi, - Original Message - > From: Lennart Poettering > Subject: Re: logrotate(8) and copytruncate as default > > journald is the only writer, it doesn't need locking. The changes it > does are done in a way so that concurrent readers will either see the > changes

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Matthew Miller
On Fri, Jun 28, 2013 at 09:48:58PM +0200, Zbigniew Jędrzejewski-Szmek wrote: > 'uid' as default doesn't make sense, at least with the current way of accesing > logs. It is really nice to be able to view messages about a service > interleaved from various sources. Now when you say 'journalctl -u htt

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Jun 28, 2013 at 02:46:25PM -0400, Matthew Miller wrote: > On Fri, Jun 28, 2013 at 07:27:30PM +0200, Zbigniew Jędrzejewski-Szmek wrote: > > Splitting is controlled by SplitMode= > > Controls whether to split up journal files per user. One of "login", > > "uid" and "none". If "login" each

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Matthew Miller
On Fri, Jun 28, 2013 at 07:27:30PM +0200, Zbigniew Jędrzejewski-Szmek wrote: > Splitting is controlled by SplitMode= > Controls whether to split up journal files per user. One of "login", > "uid" and "none". If "login" each logged in user will get his own > journal files, but systemd user IDs

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Bill Nottingham
Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) said: > Splitting is controlled by SplitMode= > > Controls whether to split up journal files per user. One of "login", > "uid" and "none". If "login" each logged in user will get his own > journal files, but systemd user IDs will log into the

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Jun 27, 2013 at 11:24:07PM -0700, Adam Williamson wrote: > On Thu, 2013-06-27 at 18:41 -0400, Colin Walters wrote: > > On Thu, 2013-06-27 at 23:38 +0200, Lennart Poettering wrote: > > > > > Why would you want this? I mean, we rate-limit per-service anyway, so > > > the issue of one app flo

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread Lennart Poettering
On Fri, 28.06.13 13:23, P J P (pj.pan...@yahoo.co.in) wrote: > > The systemd-journald takes care of all of: receiving messages, writing > > them to storage, and rotating the storage. > > > > We do synchronous rotation before each write. i.e. the moment we append > > to a file we check if the write

Re: logrotate(8) and copytruncate as default

2013-06-28 Thread P J P
   Hello Jan, - Original Message - > From: Jan Kaluza > Subject: Re: logrotate(8) and copytruncate as default > > Right now, without locking, logrotate would loss more messages if the > logs are big, because copying takes more time. It would be interesting > to mentio

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Adam Williamson
On Thu, 2013-06-27 at 18:41 -0400, Colin Walters wrote: > On Thu, 2013-06-27 at 23:38 +0200, Lennart Poettering wrote: > > > Why would you want this? I mean, we rate-limit per-service anyway, so > > the issue of one app flooding evreything else should be mostly > > non-existant. And hence, what yo

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
   Hello Jan, - Original Message - > From: Jan Kaluza > Subject: Re: logrotate(8) and copytruncate as default > > I think difference between systemd and logrotate in this case is that > logrotate is not owner of the logs it rotates. It has no control of writing >

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Jan Kaluza
- Original Message - >    Hello Lennart, Colin, > > - Original Message - > > From: Lennart Poettering > > Subject: Re: logrotate(8) and copytruncate as default > > > > The systemd-journald takes care of all of: receiving messages, writing >

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
   Hello Lennart, Colin, - Original Message - > From: Lennart Poettering > Subject: Re: logrotate(8) and copytruncate as default > > The systemd-journald takes care of all of: receiving messages, writing > them to storage, and rotating the storage. > > We do synchr

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Jan Kaluza
- Original Message - > On Thu, 2013-06-27 at 23:38 +0200, Lennart Poettering wrote: > > > Why would you want this? I mean, we rate-limit per-service anyway, so > > the issue of one app flooding evreything else should be mostly > > non-existant. And hence, what you are asking for is some

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Colin Walters
On Thu, 2013-06-27 at 23:38 +0200, Lennart Poettering wrote: > Why would you want this? I mean, we rate-limit per-service anyway, so > the issue of one app flooding evreything else should be mostly > non-existant. And hence, what you are asking for is some policy control > about what to delete fir

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Lennart Poettering
On Thu, 27.06.13 15:46, Colin Walters (walt...@verbum.org) wrote: > On Fri, 2013-06-28 at 01:44 +0800, P J P wrote: > > - Original Message - > > > > > From: Colin Walters > > > Subject: Re: logrotate(8) and copytruncate as default > > > It&#x

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Lennart Poettering
On Fri, 28.06.13 01:44, P J P (pj.pan...@yahoo.co.in) wrote: > > From: Colin Walters > > Subject: Re: logrotate(8) and copytruncate as default > > It's worth noting that all of these problems go away with the systemd > > journal. > >   Oh, how does syste

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Matthew Miller
On Thu, Jun 27, 2013 at 03:46:22PM -0400, Colin Walters wrote: > (Although it is presently not possible to easily have rotation limits > per-service and such, which is something fairly easy to do with sysvinit > + logrotate). Is there an RFE for this? Like the time-based rotation limit added earli

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Miloslav Trmač
On Thu, Jun 27, 2013 at 6:57 PM, Miloslav Trmač wrote: > On Thu, Jun 27, 2013 at 6:49 PM, Jan Kaluza wrote: >> I have the same opinion for now, but I will at least try to evaluate >> that locking idea. Maybe it can end up like more reliable >> copytruncate directive. > > I've been looking at that

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Colin Walters
On Fri, 2013-06-28 at 01:44 +0800, P J P wrote: > - Original Message - > > > From: Colin Walters > > Subject: Re: logrotate(8) and copytruncate as default > > It's worth noting that all of these problems go away with the systemd > > journal. >

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
  Hello Mirek, - Original Message - > From: Miloslav Trmač > Subject: Re: logrotate(8) and copytruncate as default > > * logrotate reads all contents of file until EOF > * application appends one more data line > * logrotate calls truncate()    I see. Thanks for

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Miloslav Trmač
On Thu, Jun 27, 2013 at 7:58 PM, P J P wrote: > IMHO, renaming a > file which is being written to by another application does no feel right. > >> _Any_ data loss during normal operation is _unacceptable_. > > Sure! As per the experiment so far, there is no data loss at all. There can be a data

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
   Hello Miloslav, - Original Message - > From: Miloslav Trmač > Subject: Re: logrotate(8) and copytruncate as default > > That's a possible argument for changing the ndjbdns logging/logrotate > configuration, AFAICS not an argument for changing the default.   

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
- Original Message - > From: Colin Walters > Subject: Re: logrotate(8) and copytruncate as default > It's worth noting that all of these problems go away with the systemd > journal.   Oh, how does systemd rotate files? --- Regards    -Prasad http://feedmug.com -- d

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
   Hi, - Original Message - > From: Jan Kaluza > Subject: Re: logrotate(8) and copytruncate as default > Right now, without locking, logrotate would loss more messages if the > logs are big, because copying takes more time. It would be interesting > to mention the file siz

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Miloslav Trmač
On Thu, Jun 27, 2013 at 6:49 PM, Jan Kaluza wrote: > I have the same opinion for now, but I will at least try to evaluate > that locking idea. Maybe it can end up like more reliable > copytruncate directive. I've been looking at that option - AFAICS mandatory file locking, at least currently, doe

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Jan Kaluza
- Original Message - > On Thu, Jun 27, 2013 at 5:19 PM, P J P wrote: > > - Original Message - > >> From: Jan Kaluža > >> Subject: Re: logrotate(8) and copytruncate as default > >> This is usually fixed by sending some signal to daemon in po

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Miloslav Trmač
On Thu, Jun 27, 2013 at 5:19 PM, P J P wrote: > - Original Message - >> From: Jan Kaluža >> Subject: Re: logrotate(8) and copytruncate as default >> This is usually fixed by sending some signal to daemon in postscript >> informing it that logs should be reop

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Colin Walters
On Thu, 2013-06-27 at 14:29 +0200, Jan Kaluža wrote: > This is usually fixed by sending some signal to daemon in postscript > informing it that logs should be reopened. That way, no messages are > lost. The worst thing which can happen is that some messages get logged > in the rotated file for

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Jan Kaluza
- Original Message - >    Hello Jan, > > - Original Message - > > From: Jan Kaluža > > Subject: Re: logrotate(8) and copytruncate as default > > > > I'm not sure right now if the benefits of the "copytruncate" usage are > &g

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
   Hello Jan, - Original Message - > From: Jan Kaluža > Subject: Re: logrotate(8) and copytruncate as default > > I'm not sure right now if the benefits of the "copytruncate" usage are > strong enough in comparison with the possibility to lost the messages

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
  Hello Jan, - Original Message - > From: Jan Kaluža > Subject: Re: logrotate(8) and copytruncate as default > This is usually fixed by sending some signal to daemon in postscript > informing it that logs should be reopened. That way, no messages are > lost. The worst

Re: logrotate(8) and copytruncate as default

2013-06-27 Thread Jan Kaluža
On 06/27/2013 01:54 PM, P J P wrote: Hi, Recently I've seen multiple issues related to new file creation by logrotate(8). A race condition described by [1], between creation of a new file and setting file permissions and acl(5). Another I came across in ndjbdns [2], as it continued to writ

logrotate(8) and copytruncate as default

2013-06-27 Thread P J P
   Hi, Recently I've seen multiple issues related to new file creation by logrotate(8). A race condition described by [1], between creation of a new file and setting file permissions and acl(5).  Another I came across in ndjbdns [2], as it continued to write to an open, but rotated log file. Wo