[tahoe-dev] tahoemenu.py - ConfigParser write method removes comments?
Garonda Rodian
deepside at hotmail.com
Tue Oct 22 06:24:02 UTC 2013
Thank you for the comments - the menu system is indeed in that category, in that it is explicitly designed to both insulate the user from hand-editing config files, and to automate repetitive edits (copy the introducer furl to each of N nodes, increment the port used by multiple nodes on the same box, share a specific convergence key, etc. etc.). Hand editing is intimidating for new users, and very tedious for setting up anything but the smallest test grid, especially for those of us who hate dynamic ports in general :).
The menu system will only make changes that the user would make - mostly tahoe.cfg, but also the convergence secret, for example, if shared convergence is desired (coming soon!).
Thank you for the link - I don't even recognize half (or more) of the functions being used in there, so I'll learn a lot when I start studying it and cleaning up the menu code more.
> Date: Mon, 21 Oct 2013 15:40:59 +0000
> From: zookog at gmail.com
> To: tahoe-dev at tahoe-lafs.org
> Subject: Re: [tahoe-dev] tahoemenu.py - ConfigParser write method removes comments?
>
> On Mon, Oct 7, 2013 at 6:12 AM, Garonda Rodian <deepside at hotmail.com> wrote:
> > I've been attempting to start a basic menu system to build grids
>
> Cool!
>
> > when I try the ConfigParser write method, all of the commented out entries in the tahoe.cfg are removed...
>
> I would suggest *not* having the menu system edit an existing
> tahoe.cfg file, but instead use it to create a new tahoe.cfg file from
> scratch and after it is created, the user would have to edit it by
> hand to change it. That's what we currently do:
>
> https://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/src/allmydata/node.py?annotate=blame&rev=ff64a0fef5879d3651bc3db6ca0522d96b217d45
>
> I think it is useful to know that the Tahoe-LAFS process is never
> going to edit the contents of your tahoe.cfg file.
>
> On the other hand, I can see that for some things — especially when
> the user does not know how to edit the cfg files by hand — we really
> need the process to change some config. The menu system probably falls
> into this category. One way that we've been handling this so far is to
> put things that only the human changes into tahoe.cfg, and put things
> that the node changes into separate files, like is done with the
> "client.port" file.
>
> Regards,
>
> Zooko
> _______________________________________________
> tahoe-dev mailing list
> tahoe-dev at tahoe-lafs.org
> https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20131022/157fb4df/attachment.html>
More information about the tahoe-dev
mailing list