From 196d4ad8409247f28460cb57572780addce6bbdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 12 Jan 2017 15:42:04 +0200 Subject: [PATCH] Document module configuration directory Added documentation for dbfwfilter and mentioned the new directory in the release notes. The configuration guide also gives an example of how the path parameters are resolved. --- .../Filters/Database-Firewall-Filter.md | 5 ++++- .../Getting-Started/Configuration-Guide.md | 8 ++++++++ .../MaxScale-2.1.0-Release-Notes.md | 17 +++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Documentation/Filters/Database-Firewall-Filter.md b/Documentation/Filters/Database-Firewall-Filter.md index e311dd785..ed17b6aa5 100644 --- a/Documentation/Filters/Database-Firewall-Filter.md +++ b/Documentation/Filters/Database-Firewall-Filter.md @@ -28,7 +28,10 @@ The database firewall filter has one mandatory parameter, `rules`. #### `rules` -Absolute path to a file with the rule definitions in it. The file should be readable by the user MariaDB MaxScale is run with. +A path to a file with the rule definitions in it. The file should be readable by +the user MariaDB MaxScale is run with. If a relative path is given, the path is +interpreted relative to the module configuration directory. The default module +configuration directory is _/etc/maxscale.modules.d_. #### `action` diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index da292da02..2c94cc660 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -394,6 +394,14 @@ Configure the directory where module configurations are stored. Path arguments are resolved relative to this directory. This directory should be used to store module specific configurations e.g. dbfwfilter rule files. +Any configuration parameter that is not an absolute path will be interpreted as +a relative path. The relative paths use the module configuration directory as +the working directory. + +For example, the configuration parameter `file=my_file.txt` would be interpreted +as `/etc/maxscale.cnf.d/my_file.txt` whereas `file=/home/user/my_file.txt` would +be interpreted as `/home/user/my_file.txt`. + ``` module_configdir=/var/lib/maxscale/ ``` diff --git a/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md index 45ae45fdd..7a7e11cc7 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md @@ -22,6 +22,23 @@ Please see the [Configuration Guide](../Getting-Started/Configuration-Guide.md#configuration) for details. +### Module configurations + +MaxScale 2.1 introduces a new directory for module configurations. This new +directory can be used to store module specific configuration files. + +Any configuration parameter that accepts a path will also support relative +paths. If a relative path is given, the path is interpreted relative to +the module configuration directory. The default value is +_/etc/maxscale.modules.d_. + +For example, the `dbfwfilter` rule files could be stored in +_/etc/maxscale.modules.d/my_rules.txt_ and referred to with +`rules=my_rules.txt`. + +For more details, refer to the documentation of _module_configdir_ in the +[Configuration Guide](../Getting-Started/Configuration-Guide.md) + ### Logging Before version 2.1.0, MaxScale created in the log directory a log file