[MXS-3619] Synchronize administrative operations Created: 2021-06-17 Updated: 2022-04-21 Resolved: 2022-04-19 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 6.0.0 |
| Fix Version/s: | 22.08.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When the configuration synchronization feature is enabled, only the configuration of MaxScale is synchronized and the actual runtime state of the objects is left intact. This means that if a server is to be drained or put into maintenance mode, the operation must be done separately on each MaxScale instance. This also includes the creation or deletion of REST API users. In addition, any externally referred files (e.g. cache filter rules) are not synchronized. This same problem applies for the GUI as well which is currently incapable of creating or modifying them. |
| Comments |
| Comment by markus makela [ 2022-03-30 ] |
|
Storing the administrative users in the same database used to store the configuration would not be that challenging. The user data could be embedded in the JSON that is stored there. For putting servers into maintenance mode, just using the --hosts option to copy the command to multiple MaxScale instaces seems like an adequate solution but only if the REST API is reachable from all the MaxScale instances.The information itself is easily embedded into the JSON as it already exists there, we just have to not remove it when it is stored in the databse. The hardest part is to react to the change in server states on the other MaxScale instances. As for any external configuration files, copying those over would require a completely new mechanism of storing them. One option is to use data URLs as a way to embed the documents in the generated configuration. By always storing the file contents as a data URL, the external files would be read during startup and/or when configured and they would be static from that point onward. This would also allow the GUI to edit these files without requiring access to the file system on the MaxScale server. The downside of this approach is that data URLs have an overhead to them as they need to be either percent encoded or base64 encoded to be made URL safe. Both of these have some overhead but we can always use the one that results in the smallest amount of data. |
| Comment by markus makela [ 2022-04-19 ] |
|
The administrative users as well as the Maintenance and Draining state are now synchronized as well. |