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

wsrep_sst_rsync timeout when lsof is not installed

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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Fix pushed to maria-5.5-galera.

            Show
            nirbhay_c Nirbhay Choubey added a comment - Fix pushed to maria-5.5-galera.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -
            Show
            nirbhay_c Nirbhay Choubey added a comment - Thanks for the suggestions Guillaume! http://bazaar.launchpad.net/~maria-captains/maria/maria-5.5-galera/revision/3489
            Hide
            atkinson.tommy Tom Atkinson added a comment -

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

            Show
            atkinson.tommy Tom Atkinson added a comment - CentOS users are also hitting this, can you add it to the rpm packages also?
            Hide
            rmorrison Ryan Morrison added a comment -

            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.

            Show
            rmorrison Ryan Morrison added a comment - 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.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

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

            Show
            nirbhay_c Nirbhay Choubey added a comment - Tom, Sure, I will update the rpm dependency list as well.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

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

            Show
            nirbhay_c Nirbhay Choubey added a comment - Hi Ryan, For now, I have added a note in the release notes.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            Update RPM dependency list.

            Show
            nirbhay_c Nirbhay Choubey added a comment - Update RPM dependency list.
            Hide
            nirbhay_c Nirbhay Choubey added a comment -

            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

            Show
            nirbhay_c Nirbhay Choubey added a comment - 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

              People

              • Assignee:
                nirbhay_c Nirbhay Choubey
                Reporter:
                fridim Guillaume Coré
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: