Skip to content

fix #1775 plugin: fd mariabackup add support mariadb 11+#1835

Merged
BareosBot merged 4 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/fix-1775-add-support-mariadb-11+
Jul 15, 2024
Merged

fix #1775 plugin: fd mariabackup add support mariadb 11+#1835
BareosBot merged 4 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/fix-1775-add-support-mariadb-11+

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented May 28, 2024

plugin: fd mariabackup add support for MariaDB 11+

note the code may still be improved by applying pylint recommandation and fixing todo

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@bruno-at-bareos bruno-at-bareos added this to the 24.0.0 milestone May 28, 2024
@bruno-at-bareos bruno-at-bareos requested a review from pstorz May 28, 2024 14:15
@bruno-at-bareos bruno-at-bareos changed the title dev/bruno/master/fix 1775 add support mariadb 11+ fix #1775 plugin: fd mariabackup add support mariadb 11+ May 28, 2024
@bruno-at-bareos bruno-at-bareos linked an issue May 28, 2024 that may be closed by this pull request
@arogge arogge requested a review from sduehr June 25, 2024 10:03
@arogge arogge force-pushed the dev/bruno/master/fix-1775-add-support-mariadb-11+ branch from 47faaff to 60b8a57 Compare June 26, 2024 12:36
@sduehr sduehr force-pushed the dev/bruno/master/fix-1775-add-support-mariadb-11+ branch from 4a74dd9 to 60b8a57 Compare June 26, 2024 19:38
Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a trivial change requested and a question about a comment.
Is the updated plugin compatible with the old one, so restore of backups taken with the old version are still restorable or is a new full required after update? If yes, then we should document that.
Should we document that the changed plugin needs MariaDB >= 10.5? Should still work with 10.3 (it's EOL anyway) but would need to set some options, as it doesn't yet have the commands mariadb-backup and mariadb.

@bruno-at-bareos
Copy link
Contributor Author

Is the updated plugin compatible with the old one, so restore of backups taken with the old version are still restorable or is a new full required after update? If yes, then we should document that. Should we document that the changed plugin needs MariaDB >= 10.5?
Should still work with 10.3 (it's EOL anyway) but would need to set some options, as it doesn't yet have the commands mariadb-backup and mariadb.

For the case of Database engine upgrade from 10.3 to 10.5, it was clear to me that user need to run a new full just after the upgrade. And previous backups are dooms as the would imply new db upgrade process.

I was not expecting to be compatible with eol mariadb 10.3 ( this plugin will be in use with bareos 24) but this can be discussed of course.

@bruno-at-bareos
Copy link
Contributor Author

Manually tested with mariadb from 11.4.2-MariaDB, client 15.2 for debian-linux-gnu (x86_64) using EditLine wrapper work well.

@bruno-at-bareos bruno-at-bareos requested a review from sduehr July 1, 2024 12:20
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-1775-add-support-mariadb-11+ branch from 1cb69c1 to 5f220a9 Compare July 1, 2024 12:39
@bruno-at-bareos
Copy link
Contributor Author

@sduehr kindly ping : could finish the review for a definitive merge?

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-1775-add-support-mariadb-11+ branch from 5f220a9 to d0a2f8d Compare July 11, 2024 14:56
@bruno-at-bareos bruno-at-bareos mentioned this pull request Jul 11, 2024
12 tasks
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-1775-add-support-mariadb-11+ branch from d0a2f8d to 864e936 Compare July 11, 2024 19:32
Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When getting the LSN, error handling should be improved as I suggested.

- cmake introduce consistent cmake variable MARIADB_BACKUP_BINARY
  instead of MARIABACKUP_BINARY
- cmake replace all call of mysql cmd to their mariadb equivalent
  Mariadb >11 start echoing deprecated warning.
  + mysql -> mariadb
  + mysqld -> mariadbd
  + mariabackup -> mariadb-backup
- split testrunner to setup,cleanup,default
- fileset replace hardcoded mysql by @MARIADB_CLIENT_BINARY@
- add function check_plugin_mariadb_version()
  this is needed to pick the right stream filename depending of
  the version. (xbstream or mbstream)
- refactor start_backup_job() function
- add function get_lsn_by_command()
- add function parse_innodb_status(res) which can be used by cmd
  and mysqlclient
- re-add self.restorecommand init in parse_plugin_definition
  so restore directory is new for each file
- reword xbstream to mbstream expect for the protocol name
- improve logging placement statements
- use black for formating
- fix my.cnf usage

mariadb package hard require python3-mysqlclient module on SUSE.
The code using this module is then used during testing; to be
able to connect to the right instance we need to provide a default
config file.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-1775-add-support-mariadb-11+ branch from 864e936 to e9bf764 Compare July 15, 2024 08:29
Co-authored-by: sduehr <stephan.duehr@bareos.com>
Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good now.

@BareosBot BareosBot merged commit aa4cb01 into bareos:master Jul 15, 2024
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/fix-1775-add-support-mariadb-11+ branch November 25, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin:mariabackup will failed with mariadb 11+

3 participants