Convert redef-able consts to runtime options


Now that the configuration framework is in git master, it would be useful if some
of the existing redef-able constants were converted to runtime options. Some of
these cannot be converted, because they are used only at initialization time.




Daniel Thayer
August 28, 2018, 12:34 PM

I did another round of conversions.

I also attached a text file with a list of all remaining redef-able consts.

Johanna Amann
August 29, 2018, 7:37 AM

Merged again in 4fd6cbd138ea97643f5c3edbf46b7dcf9ee93403.

Leaving open in case there is more to come.

Robin Sommer
August 30, 2018, 3:50 AM

Daniel, any chance to add a bit more context to that list? Is there any kind of grouping, like similar challenges for addressing them? And/or priority of things in terms of what would be good to look at first.

If you had another week, how many more could you address?

Ideally, we'd also have some kind of statement for 2.6 which ones are converted, and which ones aren't. Is there anything more specific than "those which were easiest"?

Also we should add some context on this change to NEWS. Options are still redefable, so people don't need to change their configs, but that is worth calling out I think (from a quick look, NEWS doesn't say anything about that yet)

Daniel Thayer
August 30, 2018, 3:21 PM

There are a few main categories of redef-able consts remaining:
1) the ones in scripts/base/init-bare.bro, as those are used internally by Bro,
2) the ones in the logging/input/cluster frameworks or broker-related, as those
seem to be used only during initialization,
3) there are a number of them that are used in calls to SumStats::create()
in bro_init().

So far, I have converted redef-able consts that will have the intended
effect when the value changes at any arbitrary time after Bro finishes
initializing. Not sure how to describe this more specifically.

I have pushed a commit just now that mentions this change in the NEWS file.

Jon Siwek
September 5, 2018, 2:24 AM

Removed 2.6 tag, but leaving open for now. Probably should either organize this task (reviewing/converting more things to options) as part of a "backlog" or just close the ticket (can convert things to options on case-by-case basis for when the need arises for particular bits to actually be modifiable at runtime).




Daniel Thayer



External issue ID