[MDEV-25328] --innodb command line option causes mariabackup to fail Created: 2021-04-02  Updated: 2021-04-13  Resolved: 2021-04-11

Status: Closed
Project: MariaDB Server
Component/s: Galera SST, mariabackup, Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.2.38, 10.3.29, 10.4.19, 10.5.10, 10.6.0

Type: Bug Priority: Blocker
Reporter: Julius Goryavsky Assignee: Julius Goryavsky
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Issue split
split to MDEV-25356 SST scripts should use the new mariab... Closed
Problem/Incident
is caused by MDEV-24197 Prepare step of backup failing on lar... Closed

 Description   

After MDEV-24197, all mtr tests for Galera failed during SST because mariabackup fails with the following diagnostic:

Info: Using unique option prefix 'innodb' is error-prone and can break in the future. Please use the full name 'innodb-force-recovery' instead.
210402 03:24:30 innobackupex: Starting the backup operation


There new option added by MDEV-24197 is the only argumentin the list (in "innobackupex.cc") that starts with "--innodb" prefix. As a result, get_opt treats any argument starting with "--innodb-" as shorthand for "--innodb-force-recovery".
And we get a non-zero xtrabackup_innodb_force_recovery value due to the parser's erroneous interpretation of some other argument (some other option with the "--innodb-" prefix) supposedly as "--innodb-force-recovery".
In particular, this has to do with the bootstrap process when starting mtr - it's from /mysql-test/t/bootstrap_innodb.test:

exec $MYSQLD_BOOTSTRAP_CMD --datadir=$datadir --innodb < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1;



 Comments   
Comment by Sergei Golubchik [ 2021-04-02 ]

No, this is yet another hack on top of all other hacks.
As discussed on slack, it's safer to disable prefix matching for command line options completely.

Comment by Julius Goryavsky [ 2021-04-06 ]

1) Fixed my_getopt;
2) Added a filter to the SST script;
3) Removed usage of the outdated --innobackupex interface;
4) Ffixed tests that depended on the old parser behavior;
5) Fixed the problem with passing the password through the environment.

https://github.com/MariaDB/server/commit/57d5fe737e2baf7fcb6fe48595a8d35b79305938
http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.2-MDEV-25328-v2

Comment by Julius Goryavsky [ 2021-04-07 ]

As discussed with Sergei, it was decided to split patch into a simple fix here and a separate task of transferring SST scripts to a new interface.

Comment by Julius Goryavsky [ 2021-04-07 ]

Simple one-line fix plus minor cosmetic changes to the previous patch (which caused problems) to get rid of unnecessary spaces on the command line + corrected tests that could hypothetically cause problems in the future due to abbreviations for option names:

http://buildbot.askmonty.org/buildbot/grid?category=main&branch=bb-10.2-MDEV-25328-v3
https://github.com/MariaDB/server/commit/40d63d6099c1a522dba8120368de6c3acd8c80e4

Comment by Julius Goryavsky [ 2021-04-07 ]

Everything else has been moved into a separate task: https://jira.mariadb.org/browse/MDEV-25356

Comment by Julius Goryavsky [ 2021-04-07 ]

It's the same in three different commits (just split):
https://github.com/MariaDB/server/commit/e14d1b35cff2d33f5bdcf578511c73b04245b372
https://github.com/MariaDB/server/commit/1b140716e40d8d46ba8daee296a5e2189056f554
https://github.com/MariaDB/server/commit/b767adb3ca3f718f6aafd53754253c585f23ec24

Comment by Sergei Golubchik [ 2021-04-09 ]

https://github.com/MariaDB/server/commit/e14d1b35cff2d33f5bdcf578511c73b04245b372
https://github.com/MariaDB/server/commit/1b140716e40d8d46ba8daee296a5e2189056f554
https://github.com/MariaDB/server/commit/b767adb3ca3f718f6aafd53754253c585f23ec24

are ok to push

Comment by Julius Goryavsky [ 2021-04-11 ]

fixed

Generated at Thu Feb 08 09:36:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.