Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-07-04 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 0/6] xenconsoled: rotating log file abstration"):
> Ian, do you have any opinion on this series?
> 
> Despite the pending discussion of how to proceed on the logging issue, I
> think this functionality is useful to have in xenconsoled.

I was waiting for a decision on whether to go forward with xenconsoled
for qemu logging.  But looking at your summary I see that actually
this is probably useful anyway, so I will review the patches.

Thanks,
Ian.

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-07-02 Thread Wei Liu
Ian, do you have any opinion on this series?

Despite the pending discussion of how to proceed on the logging issue, I
think this functionality is useful to have in xenconsoled.

Wei.

On Mon, Jun 06, 2016 at 04:59:35PM +0100, Wei Liu wrote:
> Wei Liu (6):
>   xenconsoled: introduce log file abstraction
>   xenconsoled: switch hypervisor log to use logfile abstraction
>   xenconsoled: switch guest log to use logfile abstraction
>   xenconsoled: delete two now unused functions
>   xenconsoled: options to control log rotation
>   xenconsoled: handle --log-backups 0 in logfile_rollover
> 
>  tools/console/daemon/io.c  | 139 +++
>  tools/console/daemon/logfile.c | 243 
> +
>  tools/console/daemon/logfile.h |  57 ++
>  tools/console/daemon/main.c|  13 ++-
>  4 files changed, 383 insertions(+), 69 deletions(-)
>  create mode 100644 tools/console/daemon/logfile.c
>  create mode 100644 tools/console/daemon/logfile.h
> 
> -- 
> 2.1.4
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread Wei Liu
On Tue, Jun 07, 2016 at 11:35:41AM +0100, David Vrabel wrote:
> On 07/06/16 11:34, Wei Liu wrote:
> > On Tue, Jun 07, 2016 at 11:29:31AM +0100, David Vrabel wrote:
> >> On 07/06/16 11:21, Wei Liu wrote:
> >>> On Tue, Jun 07, 2016 at 11:17:07AM +0100, David Vrabel wrote:
>  On 07/06/16 10:55, Wei Liu wrote:
> > On Tue, Jun 07, 2016 at 10:44:50AM +0100, David Vrabel wrote:
> >> On 06/06/16 16:59, Wei Liu wrote:
> >>> Wei Liu (6):
> >>>   xenconsoled: introduce log file abstraction
> >>>   xenconsoled: switch hypervisor log to use logfile abstraction
> >>>   xenconsoled: switch guest log to use logfile abstraction
> >>>   xenconsoled: delete two now unused functions
> >>>   xenconsoled: options to control log rotation
> >>>   xenconsoled: handle --log-backups 0 in logfile_rollover
> >>
> >> What not use syslog and/or logrotate?
> >>
> >
> > It's cumbersome to setup per guest facility for syslog. We don't want
> > console log from different guests mix together in one file.
> >
> > Logrorate runs periodically. It doesn't actively limit the disk space
> > consumed.
> >
> > The combination of syslog and logrotate can't prevent a guest from
> > filling up Dom0 disk as far as I can tell. I'm happy to know if there is
> > some sort of simple configuration we can ship with open source Xen.
> 
>  Ok. Found the other thread now.
> 
>  We should just use virtlogd instead of re-inventing the wheel.
> 
> >>>
> >>> As in importing that to our own tree (potentially a fork)? Provide
> >>> interfaces to let system administrator configure that (need to at least
> >>> check if it provides stable interfaces)?
> >>
> >> Of course not!  It would simply be an external dependency.
> >>
> >>> Not to mention to use that we need to add dependency to some sort of RPC
> >>> library in our toolstack.
> >>
> >> So?
> >>
> > 
> > That's something I would like to avoid if possible. This is just for
> > guest console logging. It's definitely not a good idea to add that to
> > xenconsoled.
> 
> Why is it a bad idea to make use of an existing solution?
> 

The burden of maintaining the interface to an external dependency is
larger then writing our own code in this particular instance.

Wei.

> David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread David Vrabel
On 07/06/16 11:34, Wei Liu wrote:
> On Tue, Jun 07, 2016 at 11:29:31AM +0100, David Vrabel wrote:
>> On 07/06/16 11:21, Wei Liu wrote:
>>> On Tue, Jun 07, 2016 at 11:17:07AM +0100, David Vrabel wrote:
 On 07/06/16 10:55, Wei Liu wrote:
> On Tue, Jun 07, 2016 at 10:44:50AM +0100, David Vrabel wrote:
>> On 06/06/16 16:59, Wei Liu wrote:
>>> Wei Liu (6):
>>>   xenconsoled: introduce log file abstraction
>>>   xenconsoled: switch hypervisor log to use logfile abstraction
>>>   xenconsoled: switch guest log to use logfile abstraction
>>>   xenconsoled: delete two now unused functions
>>>   xenconsoled: options to control log rotation
>>>   xenconsoled: handle --log-backups 0 in logfile_rollover
>>
>> What not use syslog and/or logrotate?
>>
>
> It's cumbersome to setup per guest facility for syslog. We don't want
> console log from different guests mix together in one file.
>
> Logrorate runs periodically. It doesn't actively limit the disk space
> consumed.
>
> The combination of syslog and logrotate can't prevent a guest from
> filling up Dom0 disk as far as I can tell. I'm happy to know if there is
> some sort of simple configuration we can ship with open source Xen.

 Ok. Found the other thread now.

 We should just use virtlogd instead of re-inventing the wheel.

>>>
>>> As in importing that to our own tree (potentially a fork)? Provide
>>> interfaces to let system administrator configure that (need to at least
>>> check if it provides stable interfaces)?
>>
>> Of course not!  It would simply be an external dependency.
>>
>>> Not to mention to use that we need to add dependency to some sort of RPC
>>> library in our toolstack.
>>
>> So?
>>
> 
> That's something I would like to avoid if possible. This is just for
> guest console logging. It's definitely not a good idea to add that to
> xenconsoled.

Why is it a bad idea to make use of an existing solution?

David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread Wei Liu
On Tue, Jun 07, 2016 at 11:29:31AM +0100, David Vrabel wrote:
> On 07/06/16 11:21, Wei Liu wrote:
> > On Tue, Jun 07, 2016 at 11:17:07AM +0100, David Vrabel wrote:
> >> On 07/06/16 10:55, Wei Liu wrote:
> >>> On Tue, Jun 07, 2016 at 10:44:50AM +0100, David Vrabel wrote:
>  On 06/06/16 16:59, Wei Liu wrote:
> > Wei Liu (6):
> >   xenconsoled: introduce log file abstraction
> >   xenconsoled: switch hypervisor log to use logfile abstraction
> >   xenconsoled: switch guest log to use logfile abstraction
> >   xenconsoled: delete two now unused functions
> >   xenconsoled: options to control log rotation
> >   xenconsoled: handle --log-backups 0 in logfile_rollover
> 
>  What not use syslog and/or logrotate?
> 
> >>>
> >>> It's cumbersome to setup per guest facility for syslog. We don't want
> >>> console log from different guests mix together in one file.
> >>>
> >>> Logrorate runs periodically. It doesn't actively limit the disk space
> >>> consumed.
> >>>
> >>> The combination of syslog and logrotate can't prevent a guest from
> >>> filling up Dom0 disk as far as I can tell. I'm happy to know if there is
> >>> some sort of simple configuration we can ship with open source Xen.
> >>
> >> Ok. Found the other thread now.
> >>
> >> We should just use virtlogd instead of re-inventing the wheel.
> >>
> > 
> > As in importing that to our own tree (potentially a fork)? Provide
> > interfaces to let system administrator configure that (need to at least
> > check if it provides stable interfaces)?
> 
> Of course not!  It would simply be an external dependency.
> 
> > Not to mention to use that we need to add dependency to some sort of RPC
> > library in our toolstack.
> 
> So?
> 

That's something I would like to avoid if possible. This is just for
guest console logging. It's definitely not a good idea to add that to
xenconsoled.

Please don't mix this thread with the other on-going discussion about
QEMU logging.

Wei.

> David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread David Vrabel
On 07/06/16 11:21, Wei Liu wrote:
> On Tue, Jun 07, 2016 at 11:17:07AM +0100, David Vrabel wrote:
>> On 07/06/16 10:55, Wei Liu wrote:
>>> On Tue, Jun 07, 2016 at 10:44:50AM +0100, David Vrabel wrote:
 On 06/06/16 16:59, Wei Liu wrote:
> Wei Liu (6):
>   xenconsoled: introduce log file abstraction
>   xenconsoled: switch hypervisor log to use logfile abstraction
>   xenconsoled: switch guest log to use logfile abstraction
>   xenconsoled: delete two now unused functions
>   xenconsoled: options to control log rotation
>   xenconsoled: handle --log-backups 0 in logfile_rollover

 What not use syslog and/or logrotate?

>>>
>>> It's cumbersome to setup per guest facility for syslog. We don't want
>>> console log from different guests mix together in one file.
>>>
>>> Logrorate runs periodically. It doesn't actively limit the disk space
>>> consumed.
>>>
>>> The combination of syslog and logrotate can't prevent a guest from
>>> filling up Dom0 disk as far as I can tell. I'm happy to know if there is
>>> some sort of simple configuration we can ship with open source Xen.
>>
>> Ok. Found the other thread now.
>>
>> We should just use virtlogd instead of re-inventing the wheel.
>>
> 
> As in importing that to our own tree (potentially a fork)? Provide
> interfaces to let system administrator configure that (need to at least
> check if it provides stable interfaces)?

Of course not!  It would simply be an external dependency.

> Not to mention to use that we need to add dependency to some sort of RPC
> library in our toolstack.

So?

David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread Wei Liu
On Tue, Jun 07, 2016 at 11:17:07AM +0100, David Vrabel wrote:
> On 07/06/16 10:55, Wei Liu wrote:
> > On Tue, Jun 07, 2016 at 10:44:50AM +0100, David Vrabel wrote:
> >> On 06/06/16 16:59, Wei Liu wrote:
> >>> Wei Liu (6):
> >>>   xenconsoled: introduce log file abstraction
> >>>   xenconsoled: switch hypervisor log to use logfile abstraction
> >>>   xenconsoled: switch guest log to use logfile abstraction
> >>>   xenconsoled: delete two now unused functions
> >>>   xenconsoled: options to control log rotation
> >>>   xenconsoled: handle --log-backups 0 in logfile_rollover
> >>
> >> What not use syslog and/or logrotate?
> >>
> > 
> > It's cumbersome to setup per guest facility for syslog. We don't want
> > console log from different guests mix together in one file.
> > 
> > Logrorate runs periodically. It doesn't actively limit the disk space
> > consumed.
> > 
> > The combination of syslog and logrotate can't prevent a guest from
> > filling up Dom0 disk as far as I can tell. I'm happy to know if there is
> > some sort of simple configuration we can ship with open source Xen.
> 
> Ok. Found the other thread now.
> 
> We should just use virtlogd instead of re-inventing the wheel.
> 

As in importing that to our own tree (potentially a fork)? Provide
interfaces to let system administrator configure that (need to at least
check if it provides stable interfaces)?

Not to mention to use that we need to add dependency to some sort of RPC
library in our toolstack.

Wei.

> David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread David Vrabel
On 07/06/16 10:55, Wei Liu wrote:
> On Tue, Jun 07, 2016 at 10:44:50AM +0100, David Vrabel wrote:
>> On 06/06/16 16:59, Wei Liu wrote:
>>> Wei Liu (6):
>>>   xenconsoled: introduce log file abstraction
>>>   xenconsoled: switch hypervisor log to use logfile abstraction
>>>   xenconsoled: switch guest log to use logfile abstraction
>>>   xenconsoled: delete two now unused functions
>>>   xenconsoled: options to control log rotation
>>>   xenconsoled: handle --log-backups 0 in logfile_rollover
>>
>> What not use syslog and/or logrotate?
>>
> 
> It's cumbersome to setup per guest facility for syslog. We don't want
> console log from different guests mix together in one file.
> 
> Logrorate runs periodically. It doesn't actively limit the disk space
> consumed.
> 
> The combination of syslog and logrotate can't prevent a guest from
> filling up Dom0 disk as far as I can tell. I'm happy to know if there is
> some sort of simple configuration we can ship with open source Xen.

Ok. Found the other thread now.

We should just use virtlogd instead of re-inventing the wheel.

David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread Wei Liu
On Tue, Jun 07, 2016 at 10:44:50AM +0100, David Vrabel wrote:
> On 06/06/16 16:59, Wei Liu wrote:
> > Wei Liu (6):
> >   xenconsoled: introduce log file abstraction
> >   xenconsoled: switch hypervisor log to use logfile abstraction
> >   xenconsoled: switch guest log to use logfile abstraction
> >   xenconsoled: delete two now unused functions
> >   xenconsoled: options to control log rotation
> >   xenconsoled: handle --log-backups 0 in logfile_rollover
> 
> What not use syslog and/or logrotate?
> 

It's cumbersome to setup per guest facility for syslog. We don't want
console log from different guests mix together in one file.

Logrorate runs periodically. It doesn't actively limit the disk space
consumed.

The combination of syslog and logrotate can't prevent a guest from
filling up Dom0 disk as far as I can tell. I'm happy to know if there is
some sort of simple configuration we can ship with open source Xen.

Wei.

> David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread David Vrabel
On 06/06/16 16:59, Wei Liu wrote:
> Wei Liu (6):
>   xenconsoled: introduce log file abstraction
>   xenconsoled: switch hypervisor log to use logfile abstraction
>   xenconsoled: switch guest log to use logfile abstraction
>   xenconsoled: delete two now unused functions
>   xenconsoled: options to control log rotation
>   xenconsoled: handle --log-backups 0 in logfile_rollover

What not use syslog and/or logrotate?

David

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-07 Thread Wei Liu
On Mon, Jun 06, 2016 at 03:40:33PM -0500, Doug Goldstein wrote:
> On 6/6/16 10:59 AM, Wei Liu wrote:
> > Wei Liu (6):
> >   xenconsoled: introduce log file abstraction
> >   xenconsoled: switch hypervisor log to use logfile abstraction
> >   xenconsoled: switch guest log to use logfile abstraction
> >   xenconsoled: delete two now unused functions
> >   xenconsoled: options to control log rotation
> >   xenconsoled: handle --log-backups 0 in logfile_rollover
> > 
> >  tools/console/daemon/io.c  | 139 +++
> >  tools/console/daemon/logfile.c | 243 
> > +
> >  tools/console/daemon/logfile.h |  57 ++
> >  tools/console/daemon/main.c|  13 ++-
> >  4 files changed, 383 insertions(+), 69 deletions(-)
> >  create mode 100644 tools/console/daemon/logfile.c
> >  create mode 100644 tools/console/daemon/logfile.h
> > 
> 
> Is there a mechanism for me to turn this off entirely? Due to some very
> real possibilities like logging overwhelming xenconsoled and causing
> qemu to block this is just not something that I will be able to roll out
> in any of my deployments. We would rather lose logs than block qemu.
> 

This is far from handling log for QEMU.

That needs further discussion.

Wei.

> -- 
> Doug Goldstein
> 




___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-06 Thread Doug Goldstein
On 6/6/16 10:59 AM, Wei Liu wrote:
> Wei Liu (6):
>   xenconsoled: introduce log file abstraction
>   xenconsoled: switch hypervisor log to use logfile abstraction
>   xenconsoled: switch guest log to use logfile abstraction
>   xenconsoled: delete two now unused functions
>   xenconsoled: options to control log rotation
>   xenconsoled: handle --log-backups 0 in logfile_rollover
> 
>  tools/console/daemon/io.c  | 139 +++
>  tools/console/daemon/logfile.c | 243 
> +
>  tools/console/daemon/logfile.h |  57 ++
>  tools/console/daemon/main.c|  13 ++-
>  4 files changed, 383 insertions(+), 69 deletions(-)
>  create mode 100644 tools/console/daemon/logfile.c
>  create mode 100644 tools/console/daemon/logfile.h
> 

Is there a mechanism for me to turn this off entirely? Due to some very
real possibilities like logging overwhelming xenconsoled and causing
qemu to block this is just not something that I will be able to roll out
in any of my deployments. We would rather lose logs than block qemu.

-- 
Doug Goldstein



signature.asc
Description: OpenPGP digital signature
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] [PATCH 0/6] xenconsoled: rotating log file abstration

2016-06-06 Thread Wei Liu
Wei Liu (6):
  xenconsoled: introduce log file abstraction
  xenconsoled: switch hypervisor log to use logfile abstraction
  xenconsoled: switch guest log to use logfile abstraction
  xenconsoled: delete two now unused functions
  xenconsoled: options to control log rotation
  xenconsoled: handle --log-backups 0 in logfile_rollover

 tools/console/daemon/io.c  | 139 +++
 tools/console/daemon/logfile.c | 243 +
 tools/console/daemon/logfile.h |  57 ++
 tools/console/daemon/main.c|  13 ++-
 4 files changed, 383 insertions(+), 69 deletions(-)
 create mode 100644 tools/console/daemon/logfile.c
 create mode 100644 tools/console/daemon/logfile.h

-- 
2.1.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel