[MDEV-6204] wsrep_sst_rsync timeout when lsof is not installed Created: 2014-05-02  Updated: 2014-05-25  Resolved: 2014-05-25

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.37-galera
Fix Version/s: 5.5.38-galera, 10.0.11-galera

Type: Bug Priority: Major
Reporter: Guillaume Coré Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: debian, dependance, galera
Environment:

debian



 Description   

Hi,

We use a minimal version of debian (from debootstrap) with the following packages :

ii  galera                      25.3.5-wheezy      amd64              Galera Replication Framework
ii  mariadb-galera-server       5.5.37+maria-1~whe all                MariaDB database server with Galera cluster (metapackage de
ii  mariadb-galera-server-5.5   5.5.37+maria-1~whe amd64              MariaDB database server with Galera cluster binaries

PROBLEM: wsrep_sst_rsync not usable

REASON: The package lsof is not installed by default on our version.

EXPLANATION: wsrep_sst_rsync fails because of the following test:

check_pid_and_port()
{
    local pid_file=$1
    local rsync_pid=$2
    local rsync_port=$3
 
    local port_info=$(lsof -i :$rsync_port -Pn 2>/dev/null | \
        grep "(LISTEN)")
    local is_rsync=$(echo $port_info | \
        grep -w '^rsync[[:space:]]\+'"$rsync_pid" 2>/dev/null)
 
    if [ -n "$port_info" -a -z "$is_rsync" ]; then
        wsrep_log_error "rsync daemon port '$rsync_port' has been taken"
        exit 16 # EBUSY
    fi
    check_pid $pid_file && \
        [ -n "$port_info" ] && [ -n "$is_rsync" ] && \
        [ $(cat $pid_file) -eq $rsync_pid ]
}

SUGGESTION:

  • add lsof as a dependence of mariadb-galera-server-5.5 package
  • check for lsof in the script in order to throw the appropriate error message in the log
  • (both?)


 Comments   
Comment by Nirbhay Choubey (Inactive) [ 2014-05-03 ]

Fix pushed to maria-5.5-galera.

Comment by Nirbhay Choubey (Inactive) [ 2014-05-03 ]

Thanks for the suggestions Guillaume!
http://bazaar.launchpad.net/~maria-captains/maria/maria-5.5-galera/revision/3489

Comment by Tom Atkinson [ 2014-05-22 ]

CentOS users are also hitting this, can you add it to the rpm packages also?

Comment by Ryan Morrison [ 2014-05-23 ]

Seconding Tom's request - or at least document it until the next release as wsrep over rsync is broken entirely with the 5.5.37 release.

Comment by Nirbhay Choubey (Inactive) [ 2014-05-24 ]

Tom,
Sure, I will update the rpm dependency list as well.

Comment by Nirbhay Choubey (Inactive) [ 2014-05-24 ]

Hi Ryan,
For now, I have added a note in the release notes.

Comment by Nirbhay Choubey (Inactive) [ 2014-05-24 ]

Update RPM dependency list.

Comment by Nirbhay Choubey (Inactive) [ 2014-05-25 ]

Fix pushed in maria-5.5-galera and maria-10.0-galera.
http://bazaar.launchpad.net/~maria-captains/maria/maria-5.5-galera/revision/3494

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