duplicate settings in tahoe.cfg should produce an error #1684

Open
opened 2012-03-12 18:03:21 +00:00 by davidsarah · 1 comment
davidsarah commented 2012-03-12 18:03:21 +00:00
Owner

If there are multiple lines for the same setting in tahoe.cfg (for example, multiple introducer.furl = lines), Tahoe will silently pick one of them. I think it picks the one later in the file. This is most likely a user error that should be reported. It can happen when you have commented settings and intend only one of them to be uncommented, but make a mistake, for instance.

(I know this is just the standard behaviour of ConfigParser.SafeConfigParser, but it's still broken IMHO.)

There is a minor backward-compatibility issue in that config files that worked accidentally will stop working if we make this an error. I still think it should be an error rather than a warning, though.

If there are multiple lines for the same setting in `tahoe.cfg` (for example, multiple `introducer.furl =` lines), Tahoe will silently pick one of them. I think it picks the one later in the file. This is most likely a user error that should be reported. It can happen when you have commented settings and intend only one of them to be uncommented, but make a mistake, for instance. (I know this is just the standard behaviour of `ConfigParser.SafeConfigParser`, but it's still broken IMHO.) There is a minor backward-compatibility issue in that config files that worked accidentally will stop working if we make this an error. I still think it should be an error rather than a warning, though.
tahoe-lafs added the
code-nodeadmin
major
defect
1.9.1
labels 2012-03-12 18:03:21 +00:00
tahoe-lafs added this to the undecided milestone 2012-03-12 18:03:21 +00:00
zooko commented 2012-03-13 17:52:24 +00:00
Author
Owner

+1 on making duplicate settings be an error. Here's a recent patch which inspected the config file and stopped with an error if there was something fishy. The person working on this ticket might want to emulate this patch, including its unit tests: changeset:e5c4e83f4cfe3769.

+1 on making duplicate settings be an error. Here's a recent patch which inspected the config file and stopped with an error if there was something fishy. The person working on this ticket might want to emulate this patch, including its unit tests: changeset:e5c4e83f4cfe3769.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#1684
No description provided.