1. 10 May, 2021 5 commits
  2. 09 May, 2021 1 commit
  3. 08 May, 2021 5 commits
  4. 07 May, 2021 7 commits
  5. 06 May, 2021 1 commit
    • Alexey Yurchenko's avatar
      MDEV-25418: Improve mariabackup SST script compliance with native MariaDB SSL practices · 54d7ba96
      Alexey Yurchenko authored
      and configuration.
      
      1. Pass joiner's authentication information to donor together with address
         in State Transfer Request. This allows joiner to authenticate donor on
         connection. Previously joiner would accept data from anywhere.
      
      2. Deprecate custom SSL configuration variables tca, tcert and tkey in favor
         of more familiar ssl-ca, ssl-cert and ssl-key. For backward compatibility
         tca, tcert and tkey are still supported.
      
      3. Allow falling back to server-wide SSL configuration in [mysqld] if no SSL
         configuration is found in [sst] section of the config file.
      
      4. Introduce ssl-mode variable in [sst] section that takes standard values
         and has following effects:
          - old-style SSL configuration present in [sst]: no effect
            otherwise:
          - ssl-mode=DISABLED or absent: retains old, backward compatible behavior
            and ignores any other SSL configuration
          - ssl-mode=VERIFY*: verify joiner's certificate and CN on donor,
                              verify donor's secret on joiner
                              (passed to donor via State Transfer Request)
                              BACKWARD INCOMPATIBLE BEHAVIOR
          - anything else enables new SSL configuration convetions but does not
            require verification
      
          ssl-mode should be set to VERIFY only in a fully upgraded cluster.
      
          Examples:
      
          [mysqld]
          ssl-cert=/path/to/cert
          ssl-key=/path/to/key
          ssl-ca=/path/to/ca
      
          [sst]
      
           -- server-wide SSL configuration is ignored, SST does not use SSL
      
          [mysqld]
          ssl-cert=/path/to/cert
          ssl-key=/path/to/key
          ssl-ca=/path/to/ca
      
          [sst]
          ssl-mode=REQUIRED
      
           -- use server-wide SSL configuration for SST but don't attempt to
              verify the peer identity
      
          [sst]
          ssl-cert=/path/to/cert
          ssl-key=/path/to/key
          ssl-ca=/path/to/ca
          ssl-mode=VERIFY_CA
      
           -- use SST-specific SSL configuration for SST and require verification
              on both sides
      Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
      54d7ba96
  6. 05 May, 2021 13 commits
  7. 04 May, 2021 7 commits
  8. 03 May, 2021 1 commit
    • Julius Goryavsky's avatar
      MDEV-24962: Galera SST innobackupex-move ignores Environment settings · 1ae7673a
      Julius Goryavsky authored
      After switching to the new mariabackup interface (instead of
      the outdated innobackupex interface, which is supported for
      compatibility), we need to explicitly pass a path to the datadir
      directory as a parameter, since in the new interface the value
      of this option is not automatically set in such a way that it
      always matches the SST/IST logic. This commit adds passing this
      option as an explicit parameter to mariabackup. This commit also
      removed unnecessary options that are not used and not supported
      by mariabackup.
      
      Also, numerous flaws in the common wsrep_sst_common script have
      been fixed:
      
       1) There are many bash-specific constructs in the script that
          may not be supported by other interpreters, which can lead
          to the most unexpected errors during SST, because failures
          in the interpretation of bash-specific constructs lead to
          incorrect parsing of arguments;
       2) There is parse_cnf() function which is often called by other
          scripts for the "mysqld" or "--mysqld" group, but it does not
          take into account the default group suffix, which leads to
          reading values only from the default group, which then leads
          to errors due to reading the default values instead of the
          values for a specific group;
       3) Some options such as --user, --innodb-data-home-dir or --datadir
          are not removed from the --mysqld-args list, although they are
          processed inside scripts (and passing of these options funther
          may cause problems for mariabackup);
       4) If an argument that the script understands is present in
          the --mysqld-args list twice, then this causes SST to fail,
          instead of reading the most recent value;
       5) The "--host" parameter is technically still supported among
          the arguments of the SST scripts, but in reality scripts do not
          work with it as expected, especially if it has an IPv6 address;
       6) If the port number is absent in the --address parameter value,
          but the port number is explicitly passed through the --port
          argument, then the scripts for mariabackup and xtrabackup-v2
          fail;
       7) If a new address interface is used (with the --address parameter),
          then automatic default port substitution is not performed, although
          it is supported for the legacy --host/--port interface.
       8) If there are spaces in the parameter values after --mysqld_args,
          then their further transfer does not occur correctly, which
          causes mariabackup to fail during SST - the space splits
          the argument in such a way that it breaks the parsing of the
          following parameters;
       9) If most of the parameters that are names or paths to the files
          or directories contain spaces, then SST scripts fail in an
          unpredictable way due to incorrect variable substitutions;
      10) If the --log-bin option is passed among the arguments of myqlds
          (--mysqld-args) without a parameter, and the --binlog option
          is not specified, then the script cannot substitute the default
          name for binlog and cannot construct binlog name using the
          --log-basename argument (which is against server specifications);
      11) Tail slashes are not removed from the directory names, which,
          upon further substitution, leads to the appearance of a double
          slash in the file paths;
      12) The explicit --binlog parameter (which is now always transmitted
          from the server side) and the "hidden" --log-bin parameter in the
          list of arguments after --mysqld-args are perceived as two different
          parameters in different parts of the scripts, and if they are do not
          match for some reason, this will lead to failures during SST;
      
      Also, all new changes from the 10.6 branch have been migrated here,
      including the latest pull requests for authentication (only the part
      that concerns SST scripts).
      
      It also fixes dozens of other bugs in all SST scripts.
      1ae7673a