Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.4.3
-
None
-
2016-10
Description
It would be good do have a configuration sanity check in the form:
$ maxscale --config-test
or
$ /etc/init.d/maxscale configtest
It could be implemented in the following way:
When MaxScale starts with such option should collect all options(in an array) from all modules (which should expose/register them), each option could be a structure of the type [optname, array
{opttype, allowed_values}].
Not sure that the internal array for each option is needed, but using such structures allows to use multiple types(with their type and range check) for options that can be set to more than one type, e.g.:
address= [ip | hostname]
something= 0,1,ON,OFF
Meaningful error messages could be:
Error: Unknown option 'tipe' at row 12
Error: Value '999' for option 'threads' is out of range
Error: Value '192.168.1.' for option 'address' is not valid, expected IP or HOSTNAME (this example is tricky as the mistyped IP could also be an hostname).