Skip to content

contrib add support for mariadb 11+#2215

Merged
BareosBot merged 26 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/fix-contrib-support-mariadb11+
Apr 17, 2025
Merged

contrib add support for mariadb 11+#2215
BareosBot merged 26 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/fix-contrib-support-mariadb11+

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Mar 18, 2025

This PR aims to introduce support of mariadb pure executable instead
of mysql aliases (which are now all deprecated)

MySQL support is untouched, so systems running real mysql binaries
should work out as before.

We introduce a new systemtests helper mariadb.sh which is used instead
of mysql.sh.

cmake variables are not differenciated between MYSQL_ and MARIADB_
this allow to enable disable systemtests depending of the available
binaries.

mariabackup plugin is adapted to new helper functions.

  • contrib: new plugin bareos-fd-mariadb-dump
  • contrib: new module bareos_tasks_mariadb

Needs to be checked during review:

  • is chosen mariadb-dump name is ok? ✔️
  • need to write down a mariadb chapter in the documentation howto

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
  • Required backport PRs have been created
  • Correct milestone is set
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
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 25.0.0 milestone Mar 18, 2025
@bruno-at-bareos bruno-at-bareos self-assigned this Mar 18, 2025
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-contrib-support-mariadb11+ branch from 94b004a to 590d19f Compare March 20, 2025 16:03
@arogge arogge requested a review from sebsura March 25, 2025 10:49
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

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

I get these warnings during the mariadb tests when executing testrunner-default

shutdown Mariadbd server 2025-03-28  7:31:09 0 [Warning] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some options may be missing from the help text

@arogge arogge removed this from the 25.0.0 milestone Apr 3, 2025
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-contrib-support-mariadb11+ branch from d12f0a7 to abbf631 Compare April 7, 2025 13:44
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-contrib-support-mariadb11+ branch from 1f05cf2 to 241de40 Compare April 9, 2025 08:57
@bruno-at-bareos bruno-at-bareos requested a review from sebsura April 14, 2025 14:39
@sebsura sebsura added this to the 25.0.0 milestone Apr 16, 2025
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-contrib-support-mariadb11+ branch from 241de40 to 1b1b969 Compare April 16, 2025 11:14
- add dedicated mariadb.sh script
- replace mysql.sh in BareosSystemtestFunctions.cmake
- cmake use if to filter out db_install_script if it is a link
- cmake add MARIADB_DUMP_BINARY & MYSQL_DUMP_BINARY vars to be used
  in contrib
- contrib add switch for conditional build depending on MARIADB or
  MYSQL
- simplify functions name in mariadb.sh helper script
- adapt mariabackup plugin systemtest to new mariadb helper functions
- fix typo in plugin description
- introduce new defaults-file in testrunner: mariadbdefaults.in
- adapt copyright year
mariadb-dump aims to replace obsolete mysql on systems
with MariaDB binaries, due to the deprecated aliases of `mysql*`
commands

- use unify plugin way with new name
- add debug init message
- add python version check
- use fstring everywhere
- systemtests: create new py3plug-fd-contrib-mariadb-dump
- update documentation
- update module description
- fix port aliases in systemtest configuration
- cmake: improve testing and messages

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
This contrib module help to run task on mariadb cluster.

- add systemtests fd-contrib_bareos_task_mariadb
- split test to have setup,cleanup,default
- simplify number of tests, incremental can be skipped dump operation
  are always full
Install unconditionally mariadb and mysql.
Only the systemtests has to be filtered depending on the availability
of the binaries.
- remove unused pools definitions
- use run_bconsole instead run_bareos
- add incremental data in the db and rerun a full job
- add more messages during tests
bruno-at-bareos and others added 21 commits April 17, 2025 08:24
- remove unused pools definitions
- use run_bconsole instead run_bareos
- add incremental data in the db and rerun a full job
- add more messages during tests
- remove unused pools,filesets definitions
- run only full backup
- use run_bconsole instead run_bareos
- add incremental data in the db and rerun a full job
- use Full pool in restore job
Adapt python module to newer syntax compatible with grpc testing.
- add new section about MariaDB backup in section
  `Backup Of Third Party Databases`
- move MySQL in last, add legacy terms
- renew indexes

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Co-authored-by: Sebastian Sura <124262655+sebsura@users.noreply.github.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- add comment to specify why it is always a full
- make log naming consistent
- Review and rework ThirdPartyDatabases section for mariad-dump
  plugin, adding missing options and example how to use them.
- Empty almost all content of README and add a link to corresponding
  documentation section.
- Fix typo in plugin comment
- add note in headers about dump done in memory
- import shlex and use shlex.split for command line calls
- move `--databases` default flag in defaults dumpoptions
- retrieve and format db size for statp.st_size
- enclose Popen call in try/except block
- improve and format Job and Debug messages
- fix issue#2148 take into account usage of mycnf parameter
- improve a little debug messages
- simplify systemtest fileset
- use shlex.split also for getting size db command
- testrunner-default stop bareos & mariadb in case of errors
@BareosBot BareosBot force-pushed the dev/bruno/master/fix-contrib-support-mariadb11+ branch from c8bf237 to ba3b950 Compare April 17, 2025 08:24
@BareosBot BareosBot merged commit edb91d6 into bareos:master Apr 17, 2025
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/fix-contrib-support-mariadb11+ branch July 24, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[24.0.0] MariaDB python module broken, when specify an config file

4 participants