[MDEV-17173] wsrep_sst_common.sh falsely parses address argument Created: 2018-09-11  Updated: 2018-09-13  Resolved: 2018-09-13

Status: Closed
Project: MariaDB Server
Component/s: Galera, Galera SST
Affects Version/s: 10.1
Fix Version/s: 10.2.18, 10.3.10, 10.1.37

Type: Bug Priority: Major
Reporter: Jiri Lunacek Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

The new (appeared somewhere between version 10.1.24 and 10.1.34) parsing of --address argument in wsrep_sst_common.sh does not produce expected results when the address does not have all the expected components or corresponding number of slashes included.

I made a test script (just verbatim snippet from the script) to show how the parsing works

This results into cluster nodes unable to sync using xtrabackup when WSREP_SST_OPT_LSN is set to xtrabackup_sst

$ bash test.sh 12.13.14.15
WSREP_SST_OPT_ADDR 12.13.14.15
WSREP_SST_OPT_HOST 12.13.14.15
WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
WSREP_SST_OPT_ADDR_PORT
WSREP_SST_OPT_MODULE
WSREP_SST_OPT_PATH 12.13.14.15
WSREP_SST_OPT_LSN 12.13.14.15
WSREP_SST_OPT_SST_VER 12.13.14.15
$ bash test.sh 12.13.14.15:4444
WSREP_SST_OPT_ADDR 12.13.14.15:4444
WSREP_SST_OPT_HOST 12.13.14.15
WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
WSREP_SST_OPT_ADDR_PORT 4444
WSREP_SST_OPT_MODULE 4444
WSREP_SST_OPT_PATH 12.13.14.15:4444
WSREP_SST_OPT_LSN 12.13.14.15:4444
WSREP_SST_OPT_SST_VER 12.13.14.15:4444
$ bash test.sh 12.13.14.15:4444/xtrabackup_sst
WSREP_SST_OPT_ADDR 12.13.14.15:4444/xtrabackup_sst
WSREP_SST_OPT_HOST 12.13.14.15
WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
WSREP_SST_OPT_ADDR_PORT 4444
WSREP_SST_OPT_MODULE xtrabackup_sst
WSREP_SST_OPT_PATH xtrabackup_sst
WSREP_SST_OPT_LSN xtrabackup_sst
WSREP_SST_OPT_SST_VER xtrabackup_sst
$ bash test.sh 12.13.14.15:4444/xtrabackup_sst/123456
WSREP_SST_OPT_ADDR 12.13.14.15:4444/xtrabackup_sst/123456
WSREP_SST_OPT_HOST 12.13.14.15
WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
WSREP_SST_OPT_ADDR_PORT 4444
WSREP_SST_OPT_MODULE xtrabackup_sst
WSREP_SST_OPT_PATH xtrabackup_sst/123456
WSREP_SST_OPT_LSN 123456
WSREP_SST_OPT_SST_VER 123456
$ bash test.sh 12.13.14.15:4444/xtrabackup_sst/123456/789
WSREP_SST_OPT_ADDR 12.13.14.15:4444/xtrabackup_sst/123456/789
WSREP_SST_OPT_HOST 12.13.14.15
WSREP_SST_OPT_HOST_UNESCAPED 12.13.14.15
WSREP_SST_OPT_ADDR_PORT 4444
WSREP_SST_OPT_MODULE xtrabackup_sst
WSREP_SST_OPT_PATH xtrabackup_sst/123456/789
WSREP_SST_OPT_LSN 123456
WSREP_SST_OPT_SST_VER 789



 Comments   
Comment by Jiri Lunacek [ 2018-09-11 ]

This goes back to commit e78e308e818 where incremental options first appeared.

Comment by Daniel Black [ 2018-09-13 ]

jlunacek, apologies, hoping the PR attached fixes this. If you wouldn't mind doing a test beyond the script level output that I've done I'd appreciate it.

Generated at Thu Feb 08 08:34:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.