[MDEV-26971] JSON file interface to wsrep node state / SST progress logging Created: 2021-09-07 Updated: 2023-08-10 Resolved: 2022-03-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, wsrep |
| Fix Version/s: | 10.9.0 |
| Type: | Task | Priority: | Critical |
| Reporter: | Alexey | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Preview_10.9 | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Description |
|
https://github.com/MariaDB/server/pull/1982 Codership is planning to add a new feature to cluster nodes: reporting some wsrep status variables in a dedicated JSON file, that then can be read by an external monitoring tool. Or a human for that matter. Rationale: until the server is fully initialized it is inaccessible by client and the only source of information is an error log which is not machine-friendly. Since wsrep node can spend a very long time in initialization phase (state transfer), it may be a very long time that automatic tools can't easily monitor its liveness and progression. Rationale behind using a file as opposed to some sort of a socket: it is simpler and safer and the file stays in case of the process abort, so it is easy to get the last error that caused the abort. For now the file contents will look as follows:
So there are a few most recent errors and warnings form the error log, wsrep state and a progress indicator (in case of SST/IST). I have an ready patch for MariaDB 10.4. It introduces a new variable: `wsrep_status_file`. If that variable is unset, no file is created and no reporting is done. The patch does not support SST/IST progress reporting yet, only discrete state changes. We plan to add progress reporting in the followup patches. This task contains also progress reporting for mariabackup SST
|
| Comments |
| Comment by Jan Lindström (Inactive) [ 2021-12-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ralf.gebhardt@mariadb.com julien.fritsch This needs to be moved on next release. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2022-02-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
branch: preview-10.9- Contains progress reporting for mariabackup. Testing should include testing without pv tool and with pv tool. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramesh Sivaraman [ 2022-02-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yurchenko As discussed, changes to the node state are not reflected in the wsrep_status_file when SST/IST is triggered or the node state is forcibly changed. The node wsrep state is always shown as disconnected in wsrep_status_file.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramesh Sivaraman [ 2022-03-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ok to push | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Julius Goryavsky [ 2022-03-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Added post-fix for SST scripts: https://github.com/MariaDB/server/commit/ab1a7925714727743e5dd7bb1b83014044fc5660 1) Fixed a bug with incorrect calculation of the payload length when using the --innodb-undo-directory option on the command line (not in the .cnf file); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2022-03-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For the SST script you can use following in configuration file:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramesh Sivaraman [ 2023-07-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ralf.gebhardt As discussed, these are my observations regarding this feature.
|