[MDEV-25321] mariabackup failed if password is passed via environment variable Created: 2021-04-01  Updated: 2023-07-31  Resolved: 2021-04-06

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

Type: Bug Priority: Critical
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
Relates
relates to MDEV-31809 Automatic SST user account management In Review

 Description   

The mariabackup / Galera SST (via mariabackup) failed if password is passed to it (from the Galera SST script) via MYSQL_PWD environment variable.

An example of a failure, taken from buildbot logs:

+ sudo mysqld_safe --defaults-extra-file=/home/buildbot/node2.cnf --user=mysql
ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (111)
+ sleep 3
210401 02:24:22 mysqld_safe Adding '/usr/lib/x86_64-linux-gnu/libjemalloc.so.1' to LD_PRELOAD for mysqld
210401 02:24:22 mysqld_safe Logging to '/var/lib/node2/node2.err'.
210401 02:24:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/node2
+ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ mysql -uroot -prootpass --port=8302 --protocol=tcp -e 'select * from mgc.t1'
ERROR 2013 (HY000): Lost connection to MySQL server at 'handshake: reading initial communication packet', system error: 104
+ sleep 3
+ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ mysql -uroot -prootpass --port=8302 --protocol=tcp -e 'select * from mgc.t1'
ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (111)
+ sleep 3



 Comments   
Comment by Jan Lindström (Inactive) [ 2021-04-01 ]

I'm ok with this change, note that before pushing bb results need to be checked!

Comment by Vladislav Vaintroub [ 2021-04-01 ]

there needs to be a solution that does not involve innobackupex, because it won't live forever.

Comment by Julius Goryavsky [ 2021-04-06 ]

Fixed and merged for the current revision, a solution that does not use innobackupex will be done separately (so as not to block the current development process)

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