[MDEV-15128] Galera cluster synchronization fails when using custom decompressor with arguments Created: 2018-01-30  Updated: 2021-10-15  Resolved: 2021-10-15

Status: Closed
Project: MariaDB Server
Component/s: Galera SST
Affects Version/s: 10.2.12, 10.3.4
Fix Version/s: 10.2.40

Type: Bug Priority: Critical
Reporter: Benjamin MALYNOVYTCH Assignee: Seppo Jaakola
Resolution: Fixed Votes: 0
Labels: contribution, foundation

Issue Links:
Duplicate
is duplicated by MDEV-15267 Bug in wsrep_sst_common Closed
is duplicated by MDEV-15512 Fix sh parse error when [sst] config ... Closed
Sprint: 10.2.13

 Description   

Using:

[sst]
compressor=pigz
decompressor='pigz -dc'

... makes synchronization fail with

/usr//bin/wsrep_sst_common: line 275: [: pigz: binary operator expected

The changes in

scripts/wsrep_sst_common.sh

should have been made with double-quotes rounding the variables to prevent the shell from interpreting extra args applied to the (de)compressor command.
https://github.com/MariaDB/server/commit/98e09ee4b624ded618124986fa0c04ef85e08cc0



 Comments   
Comment by Benjamin MALYNOVYTCH [ 2018-01-30 ]

https: //github.com/MariaDB/server/pull/581
https://github.com/MariaDB/server/pull/617

Comment by Benjamin MALYNOVYTCH [ 2018-01-31 ]

I've updated the pull request to base the fixes on 10.0-galera as suggested.
10.2+ will need the same reworking to fix the new variables added after 10.0+

Don't forget to update the milestone

Comment by Sachin Setiya (Inactive) [ 2018-02-06 ]

I do not think "" is required for [[

Take this script for example
It will print
Equals
Equals

a='sa sa'
b='sa sa'
if [ "$a" = "$b" ]
then
    echo "Equals"
else
    echo "Not equals"
fi
 
if [[ $a = $b ]]
then
    echo "Equals"
else
    echo "Not equals"
fi

Comment by Seppo Jaakola [ 2021-10-15 ]

sst script seems to have been fixed as part of work done for related bugs (MDEV-15267)

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