[lxc-devel] [PATCH] Move lxc-monitord.log out of /var/lib/lxc/

Stéphane Graber stgraber at ubuntu.com
Fri Apr 4 21:44:19 UTC 2014


On Fri, Apr 04, 2014 at 07:45:08PM +0200, Robert Vogelgesang wrote:
> Hi Stéphane,
> 
> On Fri, Apr 04, 2014 at 01:30:35PM -0400, Stéphane Graber wrote:
> > On Fri, Apr 04, 2014 at 07:04:03PM +0200, Robert Vogelgesang wrote:
> > > Place log file into LOGPATH instead of LXCPATH (but still use the
> > > given lxcpath if the latter differs from LXCPATH).
> > 
> > Hmm, isn't logpath the per-container logfile storage?
> 
> please note: LOGPATH, not logpath.
> 
> LOGPATH is defined via the configure script and has a default of
> "/var/log/lxc", at least when compiled under RHEL-6 / CentOS-6.

Oh, sorry, didn't go check the code and got confused, looks fine the.

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> 
> 	Robert
> 
> > If so, this seems wrong as lxc-monitord itself is a per-system thing not
> > per-container.
> > 
> > > 
> > > Signed-off-by: Robert Vogelgesang <vogel at users.sourceforge.net>
> > > 
> > > diff -up lxc-1.0.2/src/lxc/lxc_monitord.c.monitordlogpath lxc-1.0.2/src/lxc/lxc_monitord.c
> > > --- lxc-1.0.2/src/lxc/lxc_monitord.c.monitordlogpath	2014-03-27 20:10:33.000000000 +0100
> > > +++ lxc-1.0.2/src/lxc/lxc_monitord.c	2014-04-03 18:28:49.509852307 +0200
> > > @@ -348,7 +348,7 @@ int main(int argc, char *argv[])
> > >  	}
> > >  
> > >  	ret = snprintf(logpath, sizeof(logpath), "%s/lxc-monitord.log",
> > > -		       lxcpath);
> > > +		       (strcmp(LXCPATH, lxcpath) ? lxcpath : LOGPATH ) );
> > >  	if (ret < 0 || ret >= sizeof(logpath))
> > >  		return EXIT_FAILURE;
> > >  
> > > _______________________________________________
> > > lxc-devel mailing list
> > > lxc-devel at lists.linuxcontainers.org
> > > http://lists.linuxcontainers.org/listinfo/lxc-devel
> > 
> > -- 
> > Stéphane Graber
> > Ubuntu developer
> > http://www.ubuntu.com
> 
> 
> 
> > _______________________________________________
> > lxc-devel mailing list
> > lxc-devel at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-devel
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140404/b230345d/attachment.pgp>


More information about the lxc-devel mailing list