Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6204

wsrep_sst_rsync timeout when lsof is not installed

    XMLWordPrintable

Details

    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?)

      Attachments

        Activity

          People

            nirbhay_c Nirbhay Choubey (Inactive)
            fridim Guillaume Coré
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.