[lxc-devel] [PATCH v2] Remove a comment part from a config value

Stéphane Graber stgraber at ubuntu.com
Thu Aug 28 19:20:39 UTC 2014


On Thu, Aug 28, 2014 at 02:52:21PM -0400, Michael H. Warfield wrote:
> On Fri, 2014-08-29 at 02:02 +0900, KATOH Yasufumi wrote:
> > >>> On Thu, 28 Aug 2014 09:54:32 -0400
> >     in message   "Re: [lxc-devel] [PATCH v2] Remove a comment part from a config value"
> >                   Stéphane Graber-san wrote:
> > 
> > > So my understanding there is that we simply don't support in-line
> > > comments (comments after meaningful content), one of the reason being
> > > for the case you just described.
> > 
> > > Comments on their own line should already be properly handled by the
> > > config parser, that is, they are stored in a separate list and restored
> > > on save_config.
> > 
> > 
> > > I suspect this is a case where the right answer is additional
> > > documentation, making it clear that we only support comments on their
> > > own lines.
> > 
> > OK, I understand.
> > 
> > The reason that I sent that patch is that there are the standard
> > config files (in tree) that have in-line comments. 
> 
> > For example, centos.common.conf, oracle.common.conf, common.conf(on
> > master branch)...
> 
> ???
> 
> Just checked centos.common.conf, oracle.common.conf and
> fedora.common.conf.  I don't see them.  I do see lines like this:
> 
> # lxc.cap.drop = net_raw          # breaks dhcp/ping
> # lxc.cap.drop = setgid           # breaks login (initgroups/setgroups)
> # lxc.cap.drop = dac_read_search  # breaks login (pam unix_chkpwd)
> # lxc.cap.drop = setuid           # breaks sshd,nfs statd
> # lxc.cap.drop = audit_control    # breaks sshd (set_loginuid failed)
> 
> But those are comments to begin with.  If you merely uncommented them,
> you would end up with in-line comments but I don't see any active
> entries that have in-line comments at this time.
> 
> Perhaps that's a bad practice and maybe that needs to be documented
> better that you would have to remove the leading comment hash as well as
> the trailing in-line comment to uncomment the entry.

He is however correct that we do have inline comments in
config/templates/common.conf.in, I'll send a patch to move those.

The way those lines are parsed makes the comments go away, but still,
that should be fixed :)

> 
> > Thanks,
> > KATOH Yasufumi
> 
> Regards,
> Mike
> -- 
> Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
>    /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
>    NIC whois: MHW9          | An optimist believes we live in the best of all
>  PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
> 



> _______________________________________________
> 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/20140828/9e4693a7/attachment.sig>


More information about the lxc-devel mailing list