[MXS-3405] Can't split [maxscale] section settings across two config files Created: 2021-02-11  Updated: 2023-01-25  Resolved: 2023-01-25

Status: Closed
Project: MariaDB MaxScale
Component/s: N/A
Affects Version/s: 2.4.15, 2.5.7
Fix Version/s: N/A

Type: New Feature Priority: Minor
Reporter: Hartmut Holzgraefe Assignee: Johan Wikman
Resolution: Won't Do Votes: 0
Labels: None

Sprint: MXS-SPRINT-174, MXS-SPRINT-175

 Description   

With MariaDB server I can split the [mysqld] config section across several configuration files that get included by the main my.cnf

With maxscale this is not possible. E.g. having /etc/maxscale.cnf
with:

[maxscale]
threads=auto

and extra /etc/maxscale.cnf.d/log-settings.cnf

with

[maxscale]
log_info=1

leads to startup failure:

Feb 11 14:06:24 maxscale maxscale[9869]: Loading /etc/maxscale.cnf.
Feb 11 14:06:24 maxscale maxscale[9869]: Loading /etc/maxscale.cnf.d/extra.cnf.
Feb 11 14:06:24 maxscale maxscale[9869]: Duplicate section found: maxscale
Feb 11 14:06:24 maxscale maxscale[9869]: Failed to open, read or process the Max



 Comments   
Comment by markus makela [ 2021-08-25 ]

If I remember correctly, this is by design.

Comment by markus makela [ 2021-08-26 ]

Since this is the documented behavior, I'll convert this into a New Feature.

Comment by Johan Wikman [ 2023-01-25 ]

The original support case was caused by an old configuration file having been left around. The behaviour of MaxScale would probably have been better, had a more recent MaxScale been used (2.5.17 where MXS-3885 was fixed). However, had MaxScale accepted multiple maxscale sections in different static files, the effect would probably have been another kind of surprise.

When loading configuration files generated due to runtime changes, the configuration settings completely overwrite a section defined in a static configuration file. If the same section could appear in multiple static configuration files, the settings would have to be merged. It's hard to see why one would want to split, say, the definition of a server or service across multiple files. The only section for which this might be sensible is the maxscale section.

However, treating the maxscale section differently from the other sections would make things more complex. So, making it possible to split the maxscale section across multiple files causes too much pain for too little gain.

Generated at Thu Feb 08 04:21:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.