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

/usr//bin/wsrep_sst_xtrabackup-v2: line 646: WSREP_SST_OPT_PORT: unbound variable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Fixed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.2.10
    • Fix Version/s: N/A
    • Component/s: Galera SST
    • Labels:
      None

      Description

      This issue is probably a regression of the work done on MDEV-13968.

      2017-11-05 16:56:36 139938966841088 [Note] WSREP: State transfer required: 
      Group state: 8367c6fb-c25c-11e7-adf7-73c825aa596d:366 
      Local state: 00000000-0000-0000-0000-000000000000:-1 
      2017-11-05 16:56:36 139938966841088 [Note] WSREP: New cluster view: global state: 8367c6fb-c25c-11e7-adf7-73c825aa596d:366, view# 8: Primary, number of nodes: 2, my index: 0, protocol version 3 
      2017-11-05 16:56:36 139938966841088 [Warning] WSREP: Gap in state sequence. Need state transfer. 
      2017-11-05 16:56:36 139928121878272 [Note] WSREP: Running: 'wsrep_sst_xtrabackup-v2 --role 'joiner' --address '10.176.112.45' --datadir '/u01/sqldata/' --parent '27353' '' ' 
      /usr//bin/wsrep_sst_xtrabackup-v2: line 646: WSREP_SST_OPT_PORT: unbound variable 
      2017-11-05 16:56:36 139928121878272 [ERROR] WSREP: Failed to read 'ready <addr>' from: wsrep_sst_xtrabackup-v2 --role 'joiner' --address '10.176.112.45' --datadir '/u01/sqldata/' --parent '27353' '' 
      Read: '(null)' 
      2017-11-05 16:56:36 139928121878272 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup-v2 --role 'joiner' --address '10.176.112.45' --datadir '/u01/sqldata/' --parent '27353' '' : 1 (Operation not permitted) 
      2017-11-05 16:56:36 139938966841088 [ERROR] WSREP: Failed to prepare for 'xtrabackup-v2' SST. Unrecoverable. 
      2017-11-05 16:56:36 139938966841088 [ERROR] Aborting
      

      If your --address doesn't have a port host:port and you don't specify --port WSREP_SST_OPT_PORT will never be set and will result in an unbound variable error on wsrep_sst_xtrabackup-V2 script :

      if [ -n "${WSREP_SST_OPT_ADDR_PORT:-}" ]; then
        if [ -n "${WSREP_SST_OPT_PORT:-}" ]; then
          if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then
            wsrep_log_error "port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR"
            exit 2
          fi
        else
          readonly WSREP_SST_OPT_PORT="$WSREP_SST_OPT_ADDR_PORT"
        fi
      fi
      

      Possibly we need to move the else block to the outer if:

      if [ -n "${WSREP_SST_OPT_ADDR_PORT:-}" ]; then
        if [ -n "${WSREP_SST_OPT_PORT:-}" ]; then
          if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then
            wsrep_log_error "port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR"
            exit 2
          fi
        fi
      else
        readonly WSREP_SST_OPT_PORT="$WSREP_SST_OPT_ADDR_PORT"
      fi
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anikitin Andrii Nikitin (Inactive)
              Reporter:
              altmannmarcelo Marcelo Altmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: