On Tue, May 10, 2011 at 9:14 PM, Russell Bryant russell@russellbryant.net wrote:
On Tue, May 10, 2011 at 9:43 AM, Andrew Beekhof andrew@beekhof.net wrote:
On Tue, May 10, 2011 at 4:35 PM, Russell Bryant russell@russellbryant.net wrote:
On Tue, May 10, 2011 at 6:40 AM, Andrew Beekhof andrew@beekhof.net wrote:
On Mon, May 9, 2011 at 10:06 PM, astokes@fedoraproject.org wrote:
From: Adam Stokes astokes@fedoraproject.org
- We hardcoded reconnect to True in our agent code but this can hinder us when wanting to automate testing. We set reconnect to false by default and have the user decide whether or not they want their agents to keep trying to connect to a failed/misconfigured broker.
The code part is fine, but we need to turn it on by default in our sysconfig file. Both for compatibility reasons and because thats what most people are going to want.
If that's the default you want, why not make it that way in the code?
because --reconnect is clear and concise and has an obvious short form but negating it you get something like --do-not-reconnect and -d. which isn't ideal.
unless we make it --reconnect {bool}, but then is it True, true, TRUE or 1? Annoying.
i could also just be over thinking it :-)
Sure, make it a boolean option. --reconnect [yes|no]. It doesn't really matter as long as it's documented.
You're probably right. Adam: Can you take care of this please?
Speaking of which, where should these options be documented?
For now they're all in print_usage() because all agents support exactly the same options.
I'm just saying make the code the definitive place where defaults are handled.
Agreed
One reason is portability. Not every system has /etc/sysconfig, right?
-- Russell Bryant