summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 10.4 into 10.5st-10.5-juliusJulius Goryavsky2021-12-263-206/+206
|\
| * Merge branch 10.3 into 10.4Julius Goryavsky2021-12-253-206/+206
| |\
| | * Merge branch 10.2 into 10.3st-10.3-juliusJulius Goryavsky2021-12-243-206/+206
| | |\
| | | * MDEV-24097: galera[_3nodes] suite tests in MTR sporadically failsbb-10.2-MDEV-24097-galeraJulius Goryavsky2021-12-234-277/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part of the fixes for MDEV-24097. This commit contains the fixes for instability when testing Galera and when restarting nodes quickly: 1) Protection against a "stuck" old SST process during the execution of the new SST (after restarting the node) is now implemented for mariabackup / xtrabackup, which should help to avoid almost all conflicts due to the use of the same ports - both during testing with mtr, so and when restarting nodes quickly in a production environment. 2) Added more protection to scripts against unexpected return of the rc != 0 (in the commands for deleting temporary files, etc). 3) Added protection against unexpected crashes during binlog transfer (in SST scripts for rsync). 4) Spaces and some special characters in binlog filenames shouldn't be a problem now (at the script level). 5) Daemon process termination tracking has been made more robust against crashes due to unexpected termination of the previous SST process while new scripts are running. 6) Reading ssl encryption parameters has been moved from specific SST scripts to a common wsrep_sst_common.sh script, which allows unified error handling, unified diagnostics and simplifies script revisions in the future. 7) Improved diagnostics of errors related to the use of openssl. 8) Corrections have been made for xtrabackup-v2 (both in tests and in the script code) that restore the work of xtrabackup with updated versions of innodb. 9) Fixed some tests for galera_3nodes, although the complete solution for the problem of starting three nodes at the same time on fast machines will be done in a separate commit. No additional tests are required as this commit fixes problems with existing tests.
| | * | Merge branch 10.2 into 10.3Julius Goryavsky2021-12-231-1/+1
| | |\ \ | | | |/
| | | * MDEV-27181 fixup: compatibility with Windows + small correctionsbb-10.2-MDEV-27181-fixJulius Goryavsky2021-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Removed symlinks that are not very well supported in tar under Windows. 2) Added comment + changed code formatting in viosslfactories.c 3) Fixed a small bug in the yassl code. 4) Fixed a typo in the script code.
| | | * MDEV-27181: Galera SST scripts should use ssl_capath for CA directorybb-10.2-MDEV-27181-galeraJulius Goryavsky2021-12-146-400/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash).
| | * | MDEV-27181: Galera SST scripts should use ssl_capath for CA directorybb-10.3-MDEV-27181-galeraJulius Goryavsky2021-12-144-248/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash).
| * | | MDEV-27181: Galera SST scripts should use ssl_capath for CA directorybb-10.4-MDEV-27181-galeraJulius Goryavsky2021-12-144-248/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash).
* | | | MDEV-27181: Galera SST scripts should use ssl_capath for CA directorybb-10.5-MDEV-27181-galeraJulius Goryavsky2021-12-144-248/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Galera SST scripts should use ssl_capath (not ssl_ca) for CA directory. The current implementation tries to automatically detect the path using the trailing slash in the ssl_ca variable value, but this approach is not compatible with the server configuration. Now, by analogy with the server, SST scripts also use a separate ssl_capath variable. In addition, a similar tcapath variable has been added for the old-style configuration (in the "sst" section). 2. Openssl utility detection made more reliable. 3. Removed extra spaces in automatically generated command lines - to simplify debugging of the SST scripts. 4. In general, the code for detecting the presence or absence of auxiliary utilities has been improved - it is made more reliable in some configurations (and for shells other than bash).
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-11-292-4/+7
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-11-291-4/+2
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-11-294-12/+34
| | |\ \ | | | |/
| | | * mysql_install_db: remove MySQL referencesDaniel Black2021-11-241-4/+2
| | | | | | | | | | | | | | | | | | | | MySQL documentation isn't going to help our users and we shouldn't refer to it.
| | | * MDEV-26915: SST scripts do not take log_bin_index setting into accountbb-10.2-MDEV-26915-galeraJulius Goryavsky2021-11-234-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, SST scripts assume that the filename specified in the --log-bin-index argument either does not contain an extension or uses the standard ".index" extension. Similar assumptions are used for the log_bin_index parameter read from the configuration file. This commit adds support for arbitrary extensions for the index file paths.
| | | * MDEV-26064: mariabackup SST fails when starting with --innodb-force-recoveryJulius Goryavsky2021-11-233-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the server is started with the --innodb-force-recovery argument on the command line, then during SST this argument can be passed to mariabackup only at the --prepare stage, and accordingly it must be removed from the --mysqld-args list (and it is not should be passed to mariabackup otherwise). This commit fixes a flaw in the SST scripts and add a test that checks the ability to run the joiner node in a configuration that uses --innodb-force-recovery=1.
| * | | MDEV-27124: Update definer of Add/DropGeometryColumn procedures from 'root' ↵Hugo Wen2021-11-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to 'mariadb.sys' From 10.4.13, the `mariadb.sys` user was created to replace `root` definers. - In commit 0253ea7f2208354b187ffcfa2f3128878597cc11, definer of Add/DropGeometryColumn procedures was changed to `mariadb.sys`, in `scripts/maria_add_gis_sp.sql.in`. However, maria_add_gis_sp.sql only applies to new databases created by installation script. Databases upgraded from old versions will miss this change. - In addition, according to commit 0d6d801e5886208b2632247d88da106a543e1032(MDEV-23102), in some scenarios when root user is replaced it will skip creating `mariadb.sys` user. This commit is to update the definer from `root` to `mariadb.sys` during upgrade. It only makes the change if the original definers are root. Doesn't choose to execute `maria_add_gis_sp.sql` in upgrade script to recreate the procedures is because of considering the scenarios of MDEV-23102 that `root` user is replaced and `mariadb.sys` is not created. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-11-253-8/+32
|\ \ \ \ | |/ / /
| * | | MDEV-26915 post-fix: deleted unnecessary filebb-10.4-MDEV-26915-galeraJulius Goryavsky2021-11-231-1405/+0
| | | |
| * | | MDEV-26915: SST scripts do not take log_bin_index setting into accountJulius Goryavsky2021-11-234-7/+1422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, SST scripts assume that the filename specified in the --log-bin-index argument either does not contain an extension or uses the standard ".index" extension. Similar assumptions are used for the log_bin_index parameter read from the configuration file. This commit adds support for arbitrary extensions for the index file paths.
| * | | MDEV-26064: mariabackup SST fails when starting with --innodb-force-recoverybb-10.4-MDEV-26064-galeraJulius Goryavsky2021-11-232-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the server is started with the --innodb-force-recovery argument on the command line, then during SST this argument can be passed to mariabackup only at the --prepare stage, and accordingly it must be removed from the --mysqld-args list (and it is not should be passed to mariabackup otherwise). This commit fixes a flaw in the SST scripts and add a test that checks the ability to run the joiner node in a configuration that uses --innodb-force-recovery=1.
* | | | MDEV-22552: mytop packagingbb-10.5-anel-MDEV-22552Anel Husakovic2021-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `mytop` and `my_print_defaults` for RPM - Add `mytop` to client package - Add man page of `my_print_defaults` to client package - Add dependencies for RPMs - Remove old comment - Remove dead link Reviewed by: serg@mariadb.com
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-10-211-1/+1
|\ \ \ \ | |/ / /
| * | | MDEV-26363 Passwords incorrectly expiring after MySQL5.7 -> MariaDB10.3 -> ↵bb-10.4-MDEV-26363-danielblack-zero_last_password_changedDaniel Black2021-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 10.4+ upgrades MySQL-5.7 mysql.user tables have a last_password_changed field. Because before MariaDB-10.4 remained oblivious to this, the act of creating users or otherwise changing a users row left the last_password_field with 0. Running a MariaDB-10.4 instance on this would work correctly, until mysql_upgrade is run, when this 0 value immediately translates to password expired state. MySQL-5.7 relied on the password_expired enum to indicate password expiry so we aren't going to activate password that were expired in MySQL-5.7. Thanks Hans Borresen for the bug report and review of the fix.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-09-243-42/+92
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-09-243-42/+92
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-09-243-42/+92
| | |\ \ | | | |/
| | | * MDEV-26360: Using hostnames breaks certificate validationbb-10.2-MDEV-26360-galeraJulius Goryavsky2021-09-244-59/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed flaws with overly strict or, conversely, overly soft verification of certificates in some scenarios: 1. Removed the check that the 'commonname' (CN) in the certificate matches the 'localhost' value on the side of the joiner node, which was performed earlier, even if the address was received by the script only as an argument (out of the exchange via the Galera protocol) - since for the joining node this argument always contains its own local address, not the address of the remote host, so it is always treated as 'localhost', which is not necessarily true (outside of mtr testing); 2. Removed checking the domain name or IP-address of the peer node in the encrypt=2 mode; 3. Fixed checking of compliance of certificates when rsync SST is used; 4. Added the ability to specify CA not only as a file, but also as a path to the directory where the certificates are stored. To do this, the user just needs to specify the path to this directory as the value ssl-ca or tca parameter, ending with the '/' character.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-09-242-2/+6
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-09-222-2/+6
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-09-222-2/+6
| | |\ \ | | | |/
| | | * MDEV-26441: Linux-dependent construct in SST scriptsbb-10.2-MDEV-26441-galeraJulius Goryavsky2021-09-203-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SST scripts currently use Linux-specific construction to create a temporary directory if the path prefix for that directory is specified by the user. This does not work with FreeBSD. This commit adds support for FreeBSD. No separate test required.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-08-311-1/+0
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-08-311-2/+6
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-08-311-2/+6
| | |\ \ | | | |/
| | | * Remove FLUSH PRIVILEGES from mysql_setpermissionMarek Kulik2021-08-251-1/+0
| | | | | | | | | | | | | | | | FLUSH PRIVILEGES hasn't been needed for very many years.
| | | * Fix mysql_setpermission hostname logicMarek Kulik2021-08-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Don't include port in connection parameters with 'localhost' hostname More info: The hostname, if not specified or specified as '' or 'localhost', will default to a MySQL server running on the local machine using the default for the UNIX socket. To connect to a MySQL server on the local machine via TCP, you must specify the loopback IP address (127.0.0.1) as the host. Reported issue: https://bugzilla.redhat.com/show_bug.cgi?id=1976224
* | | | MDEV-26474: Fix mysql_setpermission hostname logicMarek Kulik2021-08-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Don't include port in connection parameters with 'localhost' hostname More info: The hostname, if not specified or specified as '' or 'localhost', will default to a MySQL server running on the local machine using the default for the UNIX socket. To connect to a MySQL server on the local machine via TCP, you must specify the loopback IP address (127.0.0.1) as the host. To comply with what the perl module expects, we omit the port for a host=localhost connection. Reported issue: https://bugzilla.redhat.com/show_bug.cgi?id=1976224
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-08-183-18/+50
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-08-183-18/+50
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-08-183-18/+50
| | |\ \ | | | |/ | | | | | | | | MDEV-18734 FIXME: vcol.partition triggers ASAN heap-use-after-free
| | | * MDEV-26101: Galera WSREP SST broken on 10.6 under FreeBSDJulius Goryavsky2021-08-162-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a call to the sockstat utility for FreeBSD, where this utility requires an extra "-s" parameter to display the connection status and prints one extra column.
| | | * MDEV-26340: rsync uses `--whole-file` only in wan modeJulius Goryavsky2021-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | This commit fixes a mistake where the --whole-file option is used by rsync SST in WAN mode instead of LAN.
| | | * MDEV-26211: Cluster joiner node is failed to start when using TLSJulius Goryavsky2021-08-152-30/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for reading new SSL configuration options (ssl-ca, ssl-cert and ssl-key) if the [sst] section with old options (tca, tcert and tkey) is missing in the config file, even if not specified authentication mode via the ssl-mode option. Before this change, new parameters were read only if the ssl-mode option was present in the configuration file and it was not equal to the 'DISABLED' value. Also added diagnostics (information level) which warns the user that due to the presence of the tca, tcert and/or tkey parameters in the [sst] section, new SSL configuration options will be ignored (if their values do not match the old ones).
* | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2021-07-312-6/+4
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2021-07-312-6/+4
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Sergei Golubchik2021-07-211-1/+3
| | |\ \ | | | |/
| | | * fix mysqld_safe --helpSergei Golubchik2021-07-191-1/+3
| | | | | | | | | | | | | | | | | | | | put defaults* options first (and together). list --defaults-group-suffix too
| | | * MDEV-26019: Upgrading MariaDB breaks TLS mariabackup SSTJulius Goryavsky2021-06-253-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed typo in variable name that breaks SST in some scenatios. Also fixed one small inaccuracy after MDEV-25978 which leads to the use of an uninitialized variable when the --log-bin option is specified without an argument.
| | | * MDEV-25978 : rsync SST does not work with custom binlog nameJan Lindström2021-06-231-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wsrep_sst_common did not correctly set name for binlog index file if custom binlog name was used and this name was not added to script command line. Added test case for both log_basename and log_binlog.