[libvirt] [PATCH] qemu: logrotate: drop minsize directive

Jim Fehlig posted 1 patch 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20171025213046.24385-1-jfehlig@suse.com
daemon/libvirtd.qemu.logrotate.in | 1 -
1 file changed, 1 deletion(-)
[libvirt] [PATCH] qemu: logrotate: drop minsize directive
Posted by Jim Fehlig 6 years, 5 months ago
On a cloud host it is possible to create 100's of unique instances
per day, each leaving behind a /var/log/libvirt/qemu/instance-name.log
file that is < 100k. With the current 'minsize 100k' directive, these
files are never rotated and hence never removed. Over months of time,
tens of thousands of these files can accumulate on the host.

Dropping 'minsize 100k' allows rotating small files, which will
increase the number of log files, but 'rotate 4' ensures they will
be removed after a month.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
 daemon/libvirtd.qemu.logrotate.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/daemon/libvirtd.qemu.logrotate.in b/daemon/libvirtd.qemu.logrotate.in
index 15cf019b2..cdb399ef2 100644
--- a/daemon/libvirtd.qemu.logrotate.in
+++ b/daemon/libvirtd.qemu.logrotate.in
@@ -5,5 +5,4 @@
         compress
         delaycompress
         copytruncate
-        minsize 100k
 }
-- 
2.14.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: logrotate: drop minsize directive
Posted by Daniel P. Berrange 6 years, 5 months ago
On Wed, Oct 25, 2017 at 03:30:46PM -0600, Jim Fehlig wrote:
> On a cloud host it is possible to create 100's of unique instances
> per day, each leaving behind a /var/log/libvirt/qemu/instance-name.log
> file that is < 100k. With the current 'minsize 100k' directive, these
> files are never rotated and hence never removed. Over months of time,
> tens of thousands of these files can accumulate on the host.
> 
> Dropping 'minsize 100k' allows rotating small files, which will
> increase the number of log files, but 'rotate 4' ensures they will
> be removed after a month.
> 
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
>  daemon/libvirtd.qemu.logrotate.in | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/daemon/libvirtd.qemu.logrotate.in b/daemon/libvirtd.qemu.logrotate.in
> index 15cf019b2..cdb399ef2 100644
> --- a/daemon/libvirtd.qemu.logrotate.in
> +++ b/daemon/libvirtd.qemu.logrotate.in
> @@ -5,5 +5,4 @@
>          compress
>          delaycompress
>          copytruncate
> -        minsize 100k
>  }

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: logrotate: drop minsize directive
Posted by Jim Fehlig 6 years, 5 months ago
On 10/26/2017 12:48 AM, Daniel P. Berrange wrote:
> On Wed, Oct 25, 2017 at 03:30:46PM -0600, Jim Fehlig wrote:
>> On a cloud host it is possible to create 100's of unique instances
>> per day, each leaving behind a /var/log/libvirt/qemu/instance-name.log
>> file that is < 100k. With the current 'minsize 100k' directive, these
>> files are never rotated and hence never removed. Over months of time,
>> tens of thousands of these files can accumulate on the host.
>>
>> Dropping 'minsize 100k' allows rotating small files, which will
>> increase the number of log files, but 'rotate 4' ensures they will
>> be removed after a month.
>>
>> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
>> ---
>>   daemon/libvirtd.qemu.logrotate.in | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/daemon/libvirtd.qemu.logrotate.in b/daemon/libvirtd.qemu.logrotate.in
>> index 15cf019b2..cdb399ef2 100644
>> --- a/daemon/libvirtd.qemu.logrotate.in
>> +++ b/daemon/libvirtd.qemu.logrotate.in
>> @@ -5,5 +5,4 @@
>>           compress
>>           delaycompress
>>           copytruncate
>> -        minsize 100k
>>   }
> 
> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Only after pushing this did I remember there are logrotate files for other 
hypervisor drivers: libxl, lxc, and uml. Would it be fine to push a followup 
that removes minsize from those files as well?

Regards,
Jim

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: logrotate: drop minsize directive
Posted by Daniel P. Berrange 6 years, 5 months ago
On Thu, Oct 26, 2017 at 11:13:23AM -0600, Jim Fehlig wrote:
> On 10/26/2017 12:48 AM, Daniel P. Berrange wrote:
> > On Wed, Oct 25, 2017 at 03:30:46PM -0600, Jim Fehlig wrote:
> > > On a cloud host it is possible to create 100's of unique instances
> > > per day, each leaving behind a /var/log/libvirt/qemu/instance-name.log
> > > file that is < 100k. With the current 'minsize 100k' directive, these
> > > files are never rotated and hence never removed. Over months of time,
> > > tens of thousands of these files can accumulate on the host.
> > > 
> > > Dropping 'minsize 100k' allows rotating small files, which will
> > > increase the number of log files, but 'rotate 4' ensures they will
> > > be removed after a month.
> > > 
> > > Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> > > ---
> > >   daemon/libvirtd.qemu.logrotate.in | 1 -
> > >   1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/daemon/libvirtd.qemu.logrotate.in b/daemon/libvirtd.qemu.logrotate.in
> > > index 15cf019b2..cdb399ef2 100644
> > > --- a/daemon/libvirtd.qemu.logrotate.in
> > > +++ b/daemon/libvirtd.qemu.logrotate.in
> > > @@ -5,5 +5,4 @@
> > >           compress
> > >           delaycompress
> > >           copytruncate
> > > -        minsize 100k
> > >   }
> > 
> > Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
> 
> Only after pushing this did I remember there are logrotate files for other
> hypervisor drivers: libxl, lxc, and uml. Would it be fine to push a followup
> that removes minsize from those files as well?

Yep, that makes sense.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: logrotate: drop minsize directive
Posted by Jim Fehlig 6 years, 5 months ago
On 10/26/2017 11:14 AM, Daniel P. Berrange wrote:
> On Thu, Oct 26, 2017 at 11:13:23AM -0600, Jim Fehlig wrote:
>> On 10/26/2017 12:48 AM, Daniel P. Berrange wrote:
>>> On Wed, Oct 25, 2017 at 03:30:46PM -0600, Jim Fehlig wrote:
>>>> On a cloud host it is possible to create 100's of unique instances
>>>> per day, each leaving behind a /var/log/libvirt/qemu/instance-name.log
>>>> file that is < 100k. With the current 'minsize 100k' directive, these
>>>> files are never rotated and hence never removed. Over months of time,
>>>> tens of thousands of these files can accumulate on the host.
>>>>
>>>> Dropping 'minsize 100k' allows rotating small files, which will
>>>> increase the number of log files, but 'rotate 4' ensures they will
>>>> be removed after a month.
>>>>
>>>> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
>>>> ---
>>>>    daemon/libvirtd.qemu.logrotate.in | 1 -
>>>>    1 file changed, 1 deletion(-)
>>>>
>>>> diff --git a/daemon/libvirtd.qemu.logrotate.in b/daemon/libvirtd.qemu.logrotate.in
>>>> index 15cf019b2..cdb399ef2 100644
>>>> --- a/daemon/libvirtd.qemu.logrotate.in
>>>> +++ b/daemon/libvirtd.qemu.logrotate.in
>>>> @@ -5,5 +5,4 @@
>>>>            compress
>>>>            delaycompress
>>>>            copytruncate
>>>> -        minsize 100k
>>>>    }
>>>
>>> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
>>
>> Only after pushing this did I remember there are logrotate files for other
>> hypervisor drivers: libxl, lxc, and uml. Would it be fine to push a followup
>> that removes minsize from those files as well?
> 
> Yep, that makes sense.

Thanks. Followup patch is now pushed.

Regards,
Jim

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list