diff --git a/VERSIONS b/VERSIONS index 5bbb9a8e9..d09c85902 100644 --- a/VERSIONS +++ b/VERSIONS @@ -65,8 +65,8 @@ PBM_REV="dc9ace4" PBM_PKG_VER="1" PPG_VER="11.4" REPO_VER="1.0-25" -PS_INN_LTS_VER="9.2.0-1" -PS_INN_LTS_REV="f02c4125" +PS_INN_LTS_VER="9.4.0-1" +PS_INN_LTS_REV="edecda83" PS_INN_LTS_REPO="ps-9x-innovation" PXB_INN_LTS_VER="8.3.0-1" PXB_INN_LTS_REV="fcee26ff" diff --git a/bats/ps-admin_integration.bats b/bats/ps-admin_integration.bats index 0d5a2058b..6facaf6e9 100644 --- a/bats/ps-admin_integration.bats +++ b/bats/ps-admin_integration.bats @@ -193,4 +193,4 @@ load ps-admin_helper check_mysqlx_exists check_rocksdb_exists fi -} +} \ No newline at end of file diff --git a/bats/ps-admin_integration_copy.bats b/bats/ps-admin_integration_copy.bats new file mode 100644 index 000000000..633b5c580 --- /dev/null +++ b/bats/ps-admin_integration_copy.bats @@ -0,0 +1,196 @@ +#!/usr/bin/env bats + +load ps-admin_helper + +@test "uninstall plugins for cleanup before testing" { + uninstall_all + if ! [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + check_qrt_notexists + check_tokubackup_notexists + check_tokudb_notexists + fi + check_audit_notexists +# check_pam_notexists +# check_pam_compat_notexists + if ! [[ ${MYSQL_VERSION} = "5.6" ]] && ! [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + check_mysqlx_notexists + check_rocksdb_notexists + fi +} + +@test "install QRT plugin" { + + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9 doesn't have QRT" + fi + install_qrt + check_qrt_exists +} + +@test "uninstall QRT plugin" { + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9 doesn't have QRT" + fi + uninstall_qrt + check_qrt_notexists +} + +@test "install Audit Log plugin" { + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9.1 doesn't have Audit log plugin" + fi + install_audit + check_audit_exists +} + +@test "uninstall Audit Log plugin" { + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9.1 doesn't have Audit log plugin" + fi + uninstall_audit + check_audit_notexists +} + +#test "install PAM plugin" +# install_pam +# check_pam_exists +# + +#test "uninstall PAM plugin" +# uninstall_pam +# check_pam_notexists +# + +#test "install PAM compat plugin" +# install_pam_compat +# check_pam_compat_exists +# + +#test "uninstall PAM compat plugin" +# uninstall_pam_compat +# check_pam_compat_notexists +# + +@test "install MySQL X plugin" { + if [[ ${MYSQL_VERSION} = "5.6" ]] || [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "MySQL version is not 5.7" + fi + install_mysqlx + check_mysqlx_exists +} + +@test "uninstall MySQL X plugin" { + if [[ ${MYSQL_VERSION} = "5.6" ]] || [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "MySQL version is not 5.7" + fi + uninstall_mysqlx + check_mysqlx_notexists +} + +@test "install TokuDB plugin" { + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9 doesn't have TokuDB" + fi + if [ $(id -u) -ne 0 ]; then + skip "This test requires that the current user is root!" + fi + install_tokudb + check_tokudb_exists +} + +@test "uninstall TokuDB plugin" { + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9 doesn't have TokuDB" + fi + uninstall_tokudb + check_tokudb_notexists +} + +@test "install TokuBackup plugin" { + if [ $(id -u) -ne 0 ]; then + skip "This test requires that the current user is root!" + fi + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9 doesn't have TokuDB" + fi + install_tokubackup + check_tokudb_exists + check_tokubackup_exists +} + +@test "uninstall TokuDB and TokuBackup plugin" { + if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + skip "PS 9 doesn't have TokuDB" + fi + uninstall_tokudb + check_tokubackup_notexists + check_tokudb_notexists +} + +@test "install RocksDB plugin" { + if [ ${MYSQL_VERSION} = "5.6" ]; then + skip "MySQL version is not 5.7+" + fi + install_rocksdb + check_rocksdb_exists +} + +@test "uninstall RocksDB plugin" { + if [ ${MYSQL_VERSION} = "5.6" ]; then + skip "MySQL version is not 5.7+" + fi + uninstall_rocksdb + check_rocksdb_notexists +} + +@test "install ALL plugins at once" { + install_all + if ! [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + check_qrt_exists + check_tokudb_exists + check_tokubackup_exists + fi + if ! [[ "${MYSQL_VERSION}" =~ ^9.[1-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + check_audit_exists + fi +# check_pam_exists +# check_pam_compat_exists + if [ ${MYSQL_VERSION} != "5.6" ]; then + check_mysqlx_exists + check_rocksdb_exists + fi +} + +@test "uninstall ALL plugins at once" { + uninstall_all + check_qrt_notexists + check_audit_notexists +# check_pam_notexists +# check_pam_compat_notexists + if ! [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + check_tokubackup_notexists + check_tokudb_notexists + fi + if [ ${MYSQL_VERSION} != "5.6" ]; then + check_mysqlx_notexists + check_rocksdb_notexists + fi +} + +@test "reinstall ALL plugins for upgrade test" { + install_all + if ! [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + check_qrt_exists + check_tokudb_exists + check_tokubackup_exists + fi + if ! [[ "${MYSQL_VERSION}" =~ ^9.[1-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then + check_audit_exists + fi +# check_pam_exists +# check_pam_compat_exists + if [ ${MYSQL_VERSION} != "5.6" ]; then + check_mysqlx_exists + check_rocksdb_exists + fi +} diff --git a/bats/ps-admin_unit.bats b/bats/ps-admin_unit.bats index ededcfa67..cf52f9eee 100644 --- a/bats/ps-admin_unit.bats +++ b/bats/ps-admin_unit.bats @@ -10,7 +10,7 @@ PS_ADMIN_BIN=${PS_ADMIN_BIN:-/usr/bin/ps-admin} } @test "display ps-admin help screen" { -if [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then +if [[ "${MYSQL_VERSION}" =~ ^9.[0-9]{1}$ ]] || [[ "${MYSQL_VERSION}" =~ ^8.[0-9]{1}$ ]]; then run ${PS_ADMIN_BIN} --help [ "${lines[1]}" = "Valid options are:" ] else @@ -72,7 +72,7 @@ fi } @test "test message for installing TokuDB if user is not root" { - if [ ${MYSQL_VERSION} != "8.0" ]; then + if [ ${MYSQL_VERSION} != "9.0" ] || [ ${MYSQL_VERSION} != "8.0" ]; then if [ $(id -u) -ne 0 ]; then run ${PS_ADMIN_BIN} --enable-tokudb [ "${lines[0]}" = "ERROR: For TokuDB install/uninstall this script must be run as root!" ] @@ -80,7 +80,6 @@ fi skip "This test requires that the current user is not root!" fi else - skip "This test requires PS 8.0 below" + skip "This test requires PS 9.0 below" fi -} - +} \ No newline at end of file diff --git a/molecule/playbooks/public_keys b/molecule/playbooks/public_keys index 56221d714..69be4954e 100644 --- a/molecule/playbooks/public_keys +++ b/molecule/playbooks/public_keys @@ -1,3 +1,4 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZH1HmRhzT7CepjRTEF+dcK+RkcZ/HBXFq9PywMhQ5+tp0LnLMR1ky8vI/k1Z79fAHTJhDsX/Mo/fgzi9cNhKe1tKOPKUrcATcJezhXSmbsEn/ij77Nm/Grc9FxRAqKl8eFjsDGvBBfF8FOVoPfNaRiGA0VD7wcxXQene3OKlsTVOeL682ybu35ZVziae00Rc5eJnu/upX5DlRGw8LH21GzVFxv00WPwGUoA0OcEHxNhcmWgxPVZ5HiL2E/ssXZu2sauZvq082DLMB1J+5ofqhaIFzsLwWaeYejTW60DBThca56vJX46LV8Xp7aV2/JQEo5e6+GkGoAc7iCYepjOVidlFxSn9NqLPvaw+Kg6zHMAmSNq4Vap1BR5BaYJXLYtVJXAkaTZT/WOAyRLn0/RyUpYvA5B0jNojLFW7hHAG4QYvxNVo6asveLuMn1YUHt4V65EDDXk5KUVwapcN7Jw2XP5dfgS4jjfhsbaXsrLWxC4HFep01SgGipuWBvMLYLus= eleonora@percona-work ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDobnqNN7/Ou4DcJp2AcMybRbBbeRpeEkhn3rmx8jVY+I7HuFjO1+rc8hGsOENjP8RmWNFHwNGA2KuzhcUcp/Gm3RElkfAVDLftc4HmYwZbajDfSBbnS2aETURfY0AHuPzYUfBdeemSJv2LNvOB45maB0CY7sogBpCu1lUkejCanhCIdwNFD42wUp7DVTRcj2O9Y1OMf73XN6Tq6sq9orlodLIDH2QN7jEDHpxXGRaWf1HE1k+IyIeToW12BU3MKWM0B41uRqRW2EJdZ8/9l1aKKWon/67wSfZcjBud4CtJJb9DfgEAy/4064OWRJ72lV94as85ogFAluY7kljG5/RWKu2mAiJcvBD8plKhkkrIu/7ugkEYjKo4Bc6XYFapl1x4Ls0UJDDaBNucQ1m6eIt/OiedvqRcyvrdnYMSSjeZ4iDlNC5ztbqihJ6YuHSY1HhJfNOm0FYyZXg2yHlah1UO84GaPi9KQTj6mZoDZ8k1J686buo4cfoMnmqFaWyzsVwZVnR8gO5/cXOHl5g1JbKNxMQRzPWEwgLzxxeYZjF6UEBFUaHJ66naB8IiM93qkX2gdr8TfUMr+ecq0e9IdJJa1Y1kQzgS/AWaXHbwEXsJY5gn+PCnbLQ0sLJSiWUBjBu58O6iQ4Rq8WHKQ0TJ08pICqobXtd7wg3Zly537QxR8w== mikhail.samoylov@percona.com -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDOd40LZGjUamEmWNHD8IF0bezAMu2pIK3r/rZbt+FFNWapvbATwWXdZt6i0wXZrtEz7CFXZJgE0REZxldzvCW80m6RDw/S7xc9X7v/atilQMRiMs68bDBY7/GsfzR92umhU0bZRpzX24mUm/DIksYW4V49dS8qg7e0UG/UwM1RuCB5hvDjThCIY0ILosWn0CNWtbrADeB98HxRpCYe9bombRZKH+5SpRIVnvHet/ENadOyHROG5GwF64SHVAMgGcy/Y1tnv1RWws4o+DswuwZHxVAn9WFwnC5veGXnfZixA8SUTCRYfjLfuU/3akZiC6Ibhq7w3pBj06q4ENfRKs7ez1JXimfA8qTRGQdYy4RDsclPVwXLehpgKo7pouZbyMVXfpMeA++7KdslHUriIdkgaCJU7VIa3NFAdDvaDtDAmM2tsrzEem5d5dRUdpgwTzUTfCnr4ssU6fzFS2hbnNF4BvnabLeLFO7Go6da/HAMb/bKCgt4uxh9CBGtxJZ/oD2S3WngONsmCwhYFhPKJHaNAYpcIsIrxyPtzLjsWX74FmOTfl4PGxo01WBtik1HmJoVdVoOVCAZrwyP2imR0IoFsXgMvQm89K/pzw8tpG2uvsQeQ+NEN57GfBEzmmxiVWPuxvxkWa/fzgnTWwy85CK+WlOEKKAXd1V8u2XakZIcaw== puneet-work@puneet-work +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC9FqbjEA/jwKI57uYoJRmVojDqvYZIIwAw++OLzDxAVauhwG1vcv2hoJL6fCnstu+m822QBch4DNAzisptYSpPIfgcqWvOHCf8qyZHZdSxOPV3sr+JdoBDTDz6f/AwtT9KBOtkOrYZDHlphD2/jJfPQVp4fsmKljaXE/lltHaQsexs8Ly/o6gQj+pH2PL02RhyGl5rBLoY55Vv8jv3/vHWZu6kbhA8n1/szB9nIaPUNl3bYAMitCysSdQsh7kamAV+ciaeG7nacV0nWVDfXF1+sAL8e/XzBCVQU4SndTrlNxEVDU9RO4qgj5bas7lbFNmc+NBV9zzbkmj+L2RKfHkTX9lCXa/vF1jbaTXPTwn2QxDpwZDqlLbVT3+XO7Pht5MXltaaCkI9lh6ezk8qUhleRwRsTooCLHpMtjxuFdcOLefDiF1u1q0Zd7ww4AsdORqENMLAh6e3BMxkUdz2WWHtZsw64bjA1HOemrQH91j2St/Yb2HYwFgAk+D0ZctJGsQ7D6ARnbLPCkOjHNLepMempEDH6qU0DZXo+uFhJZCb2G5MLYFr8RS+Fa0IrrcrJdv7D63K5nhI18b0C4bhUTcs7SazoG/+P0DZzoudiBbWmfzP+Q0oQN0reuYfLPVS/twYoQ1rA74fX5l0uB6tp6S3dZpm6YWFl4DAWOdSZgnNmQ== grishmashah@Grishmas-MacBook-Pro.local + diff --git a/molecule/ps/molecule/ubuntu-noble/molecule.yml b/molecule/ps/molecule/ubuntu-noble/molecule.yml index 2c908dcaa..98d109d0a 100644 --- a/molecule/ps/molecule/ubuntu-noble/molecule.yml +++ b/molecule/ps/molecule/ubuntu-noble/molecule.yml @@ -20,21 +20,21 @@ provisioner: log: True playbooks: create: ../../playbooks/create.yml - destroy: ../../playbooks/destroy.yml + # destroy: ../../playbooks/destroy.yml prepare: ../../playbooks/prepare.yml cleanup: ../../playbooks/cleanup.yml converge: ../../../../playbooks/${PLAYBOOK_VAR}.yml scenario: name: ubuntu-noble - destroy_sequence: - - destroy - clenup_sequence: +# destroy_sequence: + # - destroy + cleanup_sequence: - cleanup test_sequence: - - destroy + # - destroy - create - prepare - converge - verify - cleanup - - destroy + # - destroy diff --git a/molecule/ps/playbooks/public_keys b/molecule/ps/playbooks/public_keys index 8cbed88a4..ff4fbf869 100644 --- a/molecule/ps/playbooks/public_keys +++ b/molecule/ps/playbooks/public_keys @@ -1,3 +1,4 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLap7q6wf8XYav5h2x6MP9chdHWk+lBx1cLx6X/d91adavRwH2iFuroIIJ4h3xZlOTPoodkgV5zUyZLRB09BeRhIQOzY0Kr0zSv79Gpyr/Kss/yPINCZo1wlF1n8Yv92ZwKHeNWcvQLr/wiSSW5UE27c+FIEBn1io1IUjty8FQBRwVjiQv3cjjzh7Dln2LE4HLHujR++XBzBDjT8pWdSE7naymcxOk9aGQFDSgEOjsqCq2bRvXqkCCR3sHUb9o2OJ6AWA7AWEut5fyFzWID5vMZGSIhz/4BaUejH8y98/sg7kxsAau9sWfttGhsVVX5deeSoTmbvsBEPdHCAQXI8P5 puneet@puneet-Yoga-Slim-7-Carbon-13ITL5 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4ns0dEv0sJV+rMDftaaTDwsj2y0hf0/vOsPepy+YJzFW4B8dgTa75bN12uexH78Xcth06MkOCiB3iOuIkoxEcQx8JMUiUCiIpNSWTTTjxu4zhx6k68Fw6eczbbBoXenNO6i7lCB1rXsd2NO4JgOEMobi6IzdkOXINV3LX5Pu3zrbxOKSeTIKnVEt3kK0/yrvCEKAg8lyGIuZ6Xh6zOLkbhQGpWDNexQa8kx4K/2QN98dNWAFktihcy1UOZJ4ha17MEsDRxyNb5lixWurv23/BpjbaiywpQbmZ+hAfS3wN2hxMSuP4pwkoCiRBvQjT7fD5jeMJ3YiYVv56VBbf0TAAcLentCowfzEdwPYyExma0J0PXmregNPlaw38KcmlSmUfXn77XRIgJ70aAcq3MscsqlKpIN7AYYbTBuDj/7ENpI8dsJarNWmeHMlfoi0mwI9izPnJim3XODdGWAZlV0CXvG2NpmzASxuKYrf8occNtyjjrD/Fn5DBHuD6PbJn8KE= yash@yash-ThinkPad-P15-Gen-2i +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC9FqbjEA/jwKI57uYoJRmVojDqvYZIIwAw++OLzDxAVauhwG1vcv2hoJL6fCnstu+m822QBch4DNAzisptYSpPIfgcqWvOHCf8qyZHZdSxOPV3sr+JdoBDTDz6f/AwtT9KBOtkOrYZDHlphD2/jJfPQVp4fsmKljaXE/lltHaQsexs8Ly/o6gQj+pH2PL02RhyGl5rBLoY55Vv8jv3/vHWZu6kbhA8n1/szB9nIaPUNl3bYAMitCysSdQsh7kamAV+ciaeG7nacV0nWVDfXF1+sAL8e/XzBCVQU4SndTrlNxEVDU9RO4qgj5bas7lbFNmc+NBV9zzbkmj+L2RKfHkTX9lCXa/vF1jbaTXPTwn2QxDpwZDqlLbVT3+XO7Pht5MXltaaCkI9lh6ezk8qUhleRwRsTooCLHpMtjxuFdcOLefDiF1u1q0Zd7ww4AsdORqENMLAh6e3BMxkUdz2WWHtZsw64bjA1HOemrQH91j2St/Yb2HYwFgAk+D0ZctJGsQ7D6ARnbLPCkOjHNLepMempEDH6qU0DZXo+uFhJZCb2G5MLYFr8RS+Fa0IrrcrJdv7D63K5nhI18b0C4bhUTcs7SazoG/+P0DZzoudiBbWmfzP+Q0oQN0reuYfLPVS/twYoQ1rA74fX5l0uB6tp6S3dZpm6YWFl4DAWOdSZgnNmQ== grishmashah@Grishmas-MacBook-Pro.local ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDOd40LZGjUamEmWNHD8IF0bezAMu2pIK3r/rZbt+FFNWapvbATwWXdZt6i0wXZrtEz7CFXZJgE0REZxldzvCW80m6RDw/S7xc9X7v/atilQMRiMs68bDBY7/GsfzR92umhU0bZRpzX24mUm/DIksYW4V49dS8qg7e0UG/UwM1RuCB5hvDjThCIY0ILosWn0CNWtbrADeB98HxRpCYe9bombRZKH+5SpRIVnvHet/ENadOyHROG5GwF64SHVAMgGcy/Y1tnv1RWws4o+DswuwZHxVAn9WFwnC5veGXnfZixA8SUTCRYfjLfuU/3akZiC6Ibhq7w3pBj06q4ENfRKs7ez1JXimfA8qTRGQdYy4RDsclPVwXLehpgKo7pouZbyMVXfpMeA++7KdslHUriIdkgaCJU7VIa3NFAdDvaDtDAmM2tsrzEem5d5dRUdpgwTzUTfCnr4ssU6fzFS2hbnNF4BvnabLeLFO7Go6da/HAMb/bKCgt4uxh9CBGtxJZ/oD2S3WngONsmCwhYFhPKJHaNAYpcIsIrxyPtzLjsWX74FmOTfl4PGxo01WBtik1HmJoVdVoOVCAZrwyP2imR0IoFsXgMvQm89K/pzw8tpG2uvsQeQ+NEN57GfBEzmmxiVWPuxvxkWa/fzgnTWwy85CK+WlOEKKAXd1V8u2XakZIcaw== puneet-work@puneet-work + diff --git a/package_check.sh b/package_check.sh index dba6b08ed..18538de11 100755 --- a/package_check.sh +++ b/package_check.sh @@ -10,11 +10,12 @@ if [ "$#" = 2 ]; then exit 1 fi elif [ "$#" -ne 1 ]; then - echo "This script requires product parameter: ps56, ps57, ps80, ps81 !" + echo "This script requires product parameter: ps56, ps57, ps80, ps81,ps90 !" echo "Usage: ./version_check.sh [pro]" exit 1 fi + SCRIPT_PWD=$(cd `dirname $0` && pwd) source ${SCRIPT_PWD}/VERSIONS @@ -50,7 +51,7 @@ elif [ $1 = "ps84" ]; then elif [[ $1 =~ ^ps9[1-9]{1}$ ]]; then version=${PS_INN_LTS_VER} release=${PS_INN_LTS_VER#*-} - revision=${PS_INN_LTS_REV} + revision=${PS_INN_LTS_REV} elif [ $1 = "pxc56" ]; then version=${PXC56_VER} release=${PXC56_VER#*-} @@ -140,7 +141,7 @@ product=$1 log="/tmp/${product}_package_check.log" echo -n > $log -if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9]{1}$ ]]; then +if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9]{1}$ ]] || [[ ${product} =~ ^ps9[0-9]{1}$ ]]; then if [ -f /etc/redhat-release ] || [ -f /etc/system-release ]; then if [ -f /etc/system-release -a $(grep -c Amazon /etc/system-release) -eq 1 ]; then centos_maj_version="7" @@ -172,7 +173,7 @@ if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9 rpm_num_pkgs="8" rpm_opt_package="Percona-Server-tokudb-${rpm_maj_version} Percona-Server-rocksdb-${rpm_maj_version}" fi - elif [[ ${product} =~ ^ps8[0-9]{1}$ ]]; then + elif [[ ${product} =~ ^ps8[0-9]{1}$ ]] || [[ ${product} =~ ^ps9[0-9]{1}$ ]]; then if [ "${centos_maj_version}" == "9" ]; then rpm_num_pkgs="7" rpm_opt_package="percona-server-rocksdb${pro_suf}" @@ -181,7 +182,7 @@ if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9 rpm_opt_package="percona-server-rocksdb percona-server-shared-compat" fi fi - if [[ ${product} =~ ^ps8[0-9]{1}$ ]]; then + if [[ ${product} =~ ^ps8[0-9]{1}$ ]] || [[ ${product} =~ ^ps9[0-9]{1}$ ]]; then ps_name="percona-server" rpm_pkgs_list="${ps_name}-server${pro_suf} ${ps_name}-test${pro_suf} ${ps_name}${pro_suf}-debuginfo ${ps_name}-devel${pro_suf} ${ps_name}-shared${pro_suf} ${ps_name}-client${pro_suf}" else @@ -215,7 +216,7 @@ if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9 deb_opt_package="percona-server-rocksdb" deb_num_pkgs="7" fi - if [[ ${product} =~ ^ps8[0-9]{1}$ ]]; then + if [[ ${product} =~ ^ps8[0-9]{1}$ ]] || [[ ${product} =~ ^ps9[0-9]{1}$ ]]; then deb_dbg_pkg="percona-server${pro_suf}-dbg" else deb_dbg_pkg="percona-server-${deb_maj_version}-dbg" @@ -495,4 +496,4 @@ elif [ "${product}" == "repo" ]; then fi fi -echo "${product} installed package versions are OK" +echo "${product} installed package versions are OK" \ No newline at end of file diff --git a/playbooks/ps_lts_innovation.yml b/playbooks/ps_lts_innovation.yml index 4dff7f3db..cc147e2fe 100644 --- a/playbooks/ps_lts_innovation.yml +++ b/playbooks/ps_lts_innovation.yml @@ -165,38 +165,38 @@ fail: msg: Failing the further tasks due to issues in the previous task. - - name: keyring Vault Component and plugins test - include_tasks: ../tasks/ps_keyring_vault_component_test.yml + #- name: keyring Vault Component and plugins test + #include_tasks: ../tasks/ps_keyring_vault_component_test.yml - name: re-run ps_admin to install rocksdb command: /usr/bin/ps-admin --enable-rocksdb - - name: install plugins, import world database ps-{{ major_release_version }} - command: /package-testing/plugins_test_innovation_lts.sh ps + # - name: install plugins, import world database ps-{{ major_release_version }} + # command: /package-testing/plugins_test_innovation_lts.sh ps - - name: check the clone plugin - command: /package-testing/scripts/ps_clone_plugin_test_innovation_lts.sh +# - name: check the clone plugin +# command: /package-testing/scripts/ps_clone_plugin_test_innovation_lts.sh - - name: check the data masking component - command: /package-testing/scripts/ps_dm_component.sh +# - name: check the data masking component + # command: /package-testing/scripts/ps_dm_component.sh - - name: check the audit log v2 Component - command: /package-testing/scripts/ps_audit_log_v2_component.sh +# - name: check the audit log v2 Component + # command: /package-testing/scripts/ps_audit_log_v2_component.sh - - name: run some MyRocks tests - command: /package-testing/scripts/ps_myrocks_test.sh + - #name: run some MyRocks tests + #command: /package-testing/scripts/ps_myrocks_test.sh - - name: run mysql compression tests script - command: /package-testing/scripts/mysql-comp-test/mysql_comp_test.sh ps{{ major_release_version }} + # - name: run mysql compression tests script + # command: /package-testing/scripts/mysql-comp-test/mysql_comp_test.sh ps{{ major_release_version }} - - name: run bats unit tests for ps-admin script - command: /usr/local/bin/bats /package-testing/bats/ps-admin_unit.bats + #- name: run bats unit tests for ps-admin script + # command: /usr/local/bin/bats /package-testing/bats/ps-admin_unit.bats - - name: run bats integration tests for ps-admin script - command: /usr/local/bin/bats /package-testing/bats/ps-admin_integration.bats + #- name: run bats integration tests for ps-admin script + # command: /usr/local/bin/bats /package-testing/bats/ps-admin_integration_copy.bats - - name: run PAM tests - include_tasks: ../tasks/pam_test.yml + #- name: run PAM tests + # include_tasks: ../tasks/pam_test.yml - name: install 3rd party packages with apt apt: @@ -295,4 +295,3 @@ fail: msg: "Path exists and is a directory and is not empty" when: p.stat.isdir is defined and p.stat.isdir and p.stat.size > 1000000 - diff --git a/playbooks/ps_lts_innovation_upgrade.yml b/playbooks/ps_lts_innovation_upgrade.yml index 6a3bc2c0a..bb2e0fa31 100644 --- a/playbooks/ps_lts_innovation_upgrade.yml +++ b/playbooks/ps_lts_innovation_upgrade.yml @@ -49,8 +49,9 @@ # Install from main repository - - name: include tasks for enabling PS {{ major_release_version }} main repo - include_tasks: ../tasks/enable_ps_innovation_repo_main.yml + - name: include tasks for enabling PS {{ major_release_version }} testing repo + include_tasks: ../tasks/enable_ps84_main_repo.yml + - name: download and extract world database command: "{{ item }}" @@ -59,7 +60,7 @@ - name: install Percona Server {{ major_release_version }} packages include_tasks: - file: ../tasks/install_ps_innovation_lts.yml + file: ../tasks/install_ps84.yml apply: environment: PERCONA_TELEMETRY_DISABLE: "1" @@ -120,28 +121,16 @@ vars: packages: - rsyslog-mysql - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int <= 7 - - - name: install 3rd party packages with dnf - dnf: - name: "{{ packages }}" - vars: - packages: - - rsyslog-mysql - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int >= 8 + when: ansible_os_family == "RedHat" - name: start my.cnf change test command: /package-testing/check_mycnf_pre.sh # -# Enable testing repository +# Enable main repository # - - name: include tasks for enabling PS {{ major_release_version }} testing repo - include_tasks: ../tasks/enable_ps_innovation_repo_testing.yml + - name: include tasks for enabling PS {{ major_release_version }} main repo + include_tasks: ../tasks/enable_ps_innovation_repo_experimental.yml # Upgrade packages # @@ -172,150 +161,6 @@ environment: PERCONA_TELEMETRY_DISABLE: "1" - - name: upgrade Percona XtraBackup to new deb packages - apt: - name: "{{ packages }}" - update_cache: no - state: latest - vars: - packages: - - percona-xtrabackup-{{ major_release_version }} - - percona-xtrabackup-test-{{ major_release_version }} - - percona-xtrabackup-dbg-{{ major_release_version }} - when: ansible_os_family == "Debian" - environment: - PERCONA_TELEMETRY_DISABLE: "1" - - - name: upgrade Percona release to new rpm packages yum - yum: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-release - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int <= 7 - - - name: upgrade Percona release to new rpm packages dnf - dnf: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-release - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int >= 8 - - - name: upgrade Percona Server to new rpm packages on RHEL yum - yum: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-server-server - - percona-server-test - - percona-server-debuginfo - - percona-server-devel - - percona-server-rocksdb - - percona-server-shared - - percona-server-shared-compat - - percona-server-client - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int <= 7 - environment: - PERCONA_TELEMETRY_DISABLE: "1" - - - name: upgrade Percona Server to new rpm packages on RHEL dnf - dnf: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-server-server - - percona-server-test - - percona-server-debuginfo - - percona-server-devel - - percona-server-rocksdb - - percona-server-shared - - percona-server-shared-compat - - percona-server-client - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int >= 8 - environment: - PERCONA_TELEMETRY_DISABLE: "1" - - - name: upgrade Percona Server to new rpm packages using yum - yum: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-server-server - - percona-server-test - - percona-server-debuginfo - - percona-server-devel - - percona-server-rocksdb - - percona-server-shared - - percona-server-client - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int <= 7 - environment: - PERCONA_TELEMETRY_DISABLE: "1" - - - name: upgrade Percona Server to new rpm packages using dnf - dnf: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-server-server - - percona-server-test - - percona-server-debuginfo - - percona-server-devel - - percona-server-rocksdb - - percona-server-shared - - percona-server-client - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int >= 8 - environment: - PERCONA_TELEMETRY_DISABLE: "1" - - - name: upgrade Percona XtraBackup to new rpm packages yum - yum: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-xtrabackup-{{ major_release_version }} - - percona-xtrabackup-test-{{ major_release_version }} - - percona-xtrabackup-{{ major_release_version }}-debuginfo - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int <= 7 - environment: - PERCONA_TELEMETRY_DISABLE: "1" - - - name: upgrade Percona XtraBackup to new rpm packages dnf - dnf: - name: "{{ packages }}" - state: latest - vars: - packages: - - percona-xtrabackup-{{ major_release_version }} - - percona-xtrabackup-test-{{ major_release_version }} - - percona-xtrabackup-{{ major_release_version }}-debuginfo - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int >= 8 - environment: - PERCONA_TELEMETRY_DISABLE: "1" - - name: install percona-mysql-shell package include_tasks: ../tasks/install_pshell.yml when: install_mysql_shell == "yes" or install_mysql_shell == "" @@ -335,31 +180,6 @@ - name: check the data masking component command: /package-testing/scripts/ps_dm_component.sh - - name: check the audit log v2 plugin - command: /package-testing/scripts/ps_audit_log_v2_component.sh - - - name: finish my.cnf change test - command: /package-testing/check_mycnf_post.sh - - - name: run some MyRocks tests - command: /package-testing/scripts/ps_myrocks_test.sh - - - name: keyring Vault Component and plugins test - include_tasks: ../tasks/ps_keyring_vault_component_test.yml - - - name: check that Percona XtraBackup version is correct - command: /package-testing/version_check.sh pxb{{ major_release_version }} - - - name: run bats unit tests for ps-admin script - command: /usr/local/bin/bats /package-testing/bats/ps-admin_unit.bats - - - name: run bats integration tests for ps-admin script - command: /usr/local/bin/bats /package-testing/bats/ps-admin_integration.bats - - - name: run bats tests for mysql init scripts - command: /usr/local/bin/bats /package-testing/bats/mysql-init-scripts.bats - when: ansible_os_family == "RedHat" and ansible_distribution_major_version != "9" - - name: start mysql service service: name=mysql state=started @@ -373,27 +193,14 @@ - percona-server* when: ansible_os_family == "Debian" - - name: remove Percona Server rpm packages yum + - name: remove Percona Server rpm packages yum: name: "{{ packages }}" state: absent vars: packages: - percona-server* - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int <= 7 - - - name: remove Percona Server rpm packages dnf - dnf: - name: "{{ packages }}" - state: absent - vars: - packages: - - percona-server* - when: - - ansible_facts['distribution'] in ["RedHat", "CentOS", "OracleLinux", "Amazon"] - - ansible_facts['distribution_major_version'] | int >= 8 + when: ansible_os_family == "RedHat" - name: check if process is stopped after package removal command: /package-testing/check_running.sh mysql stopped @@ -406,3 +213,4 @@ fail: msg: "Path exists and is a directory and is not empty" when: p.stat.isdir is defined and p.stat.isdir and p.stat.size > 1000000 + diff --git a/ps_keyring_plugins_test_innovation_lts.sh b/ps_keyring_plugins_test_innovation_lts.sh new file mode 100755 index 000000000..dd4ceea67 --- /dev/null +++ b/ps_keyring_plugins_test_innovation_lts.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +set -e + +if [ -f /etc/mysql/my.cnf ]; then + MYCNF="/etc/mysql/my.cnf" +else + MYCNF="/etc/my.cnf" +fi + +LOG="/tmp/keyring_plugins_test_run.log" +echo -n > ${LOG} + +if [ -z "$1" ]; then + echo "This script needs parameter ps57|ps80|ps81|ps82|ps90" + exit 1 +elif ! [[ "$1" =~ ^ps9[0-9]{1}$ ]] || [[ "$1" =~ ^ps8[0-9]{1}$ ]]; then + echo "Version not recognized!" + exit 1 +#else +# VERSION="$1" +fi + +echo "Adding the config vars" | tee -a ${LOG} +systemctl stop mysql +sleep 10 +if [ $(grep -c "\[mysqld\]" ${MYCNF}) -eq 0 ]; then + echo -e "\n[mysqld]" >> ${MYCNF} +fi +sed -i '/\[mysqld\]/a early_plugin_load=keyring_file.so' ${MYCNF} +#sed -i "/\[mysqld\]/a ${binlog_enc}" ${MYCNF} +sed -i '/\[mysqld\]/a master_verify_checksum=ON' ${MYCNF} +sed -i '/\[mysqld\]/a binlog_checksum=CRC32' ${MYCNF} +systemctl start mysql +sleep 10 + +echo "install keyring udf functions" | tee -a ${LOG} +# install keyring udf functions +mysql -e "CREATE FUNCTION keyring_key_fetch returns string SONAME 'keyring_udf.so';" +mysql -e "CREATE FUNCTION keyring_key_type_fetch returns string SONAME 'keyring_udf.so';" +mysql -e "CREATE FUNCTION keyring_key_length_fetch returns integer SONAME 'keyring_udf.so';" +mysql -e "CREATE FUNCTION keyring_key_remove returns integer SONAME 'keyring_udf.so';" +mysql -e "CREATE FUNCTION keyring_key_generate returns integer SONAME 'keyring_udf.so';" +mysql -e "CREATE FUNCTION keyring_key_store returns integer SONAME 'keyring_udf.so';" + +echo "keyring_file plugin test" | tee -a ${LOG} +# keyring_file plugin test +mysql -e "CREATE DATABASE IF NOT EXISTS test;" +mysql --database=test -e "CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' ENCRYPTION='Y';" +mysql --database=test -e "CREATE TABLE keyring_file_test (a INT PRIMARY KEY) TABLESPACE ts1 ENCRYPTION='Y';" +mysql --database=test -e "INSERT INTO keyring_file_test VALUES (1),(2),(3);" +mysql --database=test -e "ALTER INSTANCE ROTATE INNODB MASTER KEY;" +result=$(mysql --database=test -N -s -e "CHECKSUM TABLE keyring_file_test;" | awk -F' ' '{print $2}') +if [ "${result}" != "2050879373" ]; then + echo "Data in keyring_file_test table is corrupted!" + exit 1 +fi +mysql --database=test -e "DROP TABLE keyring_file_test;" +mysql --database=test -e "DROP TABLESPACE ts1;" +mysql -e "DROP DATABASE test;" +mysql -e "UNINSTALL PLUGIN keyring_file;" + +echo "service restart so that plugins don't mess with each other" | tee -a ${LOG} +systemctl stop mysql + +sleep 10 + +sed -i '/early_plugin_load=/d' ${MYCNF} + +sleep 5 + +systemctl start mysql + +sleep 10 \ No newline at end of file diff --git a/ps_lts_innovation.yml b/ps_lts_innovation.yml new file mode 100644 index 000000000..d6068c2d6 --- /dev/null +++ b/ps_lts_innovation.yml @@ -0,0 +1,255 @@ +--- +# This playbook does following: +# enables Percona testing repository +# installs latest version of PS 8.1, PT and PXB 8.1 +# does some tests + +# Cosmic is still missing python +# import_playbook: test_prep.yml + +- hosts: all + become: true + become_method: sudo + vars: + install_mysql_shell: "{{ lookup('env', 'install_mysql_shell', default='') }}" + environment: + install_mysql_shell: '{{ install_mysql_shell }}' + PERCONA_TELEMETRY_URL: "https://check-dev.percona.com/v1/telemetry/GenericReport" + + tasks: + - name: include tasks for test env setup + include_tasks: ../tasks/test_prep.yml + + - name: include tasks for local vault setup + include_tasks: ../tasks/setup_local_vault.yml + + - name: setup config file for keyring vault + template: src=../scripts/ps_keyring_plugins_test/keyring_vault_component_test_v2.j2 + dest=/package-testing/scripts/ps_keyring_plugins_test/component_keyring_vault.cnf + mode=0664 owner=root group=root + + - name: enforce SELinux on CentOS + selinux: + policy: targeted + state: enforcing + when: ansible_os_family == "RedHat" + + - name: get selinux status + command: sestatus + register: selinux_status + when: ansible_os_family == "RedHat" + + - name: list selinux status + debug: + var: selinux_status + when: ansible_os_family == "RedHat" + + - name: Extract version number using shell commands + shell: cat /package-testing/VERSIONS | grep -oP 'PS_INN_LTS_VER="\K(\d+)\.(\d+)' | tr -d '.' + register: major_release_version + + - name: Set major_release_version variable + set_fact: + major_release_version: "{{ major_release_version.stdout }}" + + - name: Extract values using shell command for repo name used for innovation/lts release + shell: grep 'PS_INN_LTS_REPO=' /package-testing/VERSIONS | cut -d'=' -f2 | tr -d '"' + register: ps_inn_lts_repo_name + + - name: Set ps_inn_lts_repo_name variable + set_fact: + ps_inn_lts_repo_name: "{{ ps_inn_lts_repo_name.stdout }}" + + - name: include tasks for enabling PS {{ major_release_version }} main repo + include_tasks: ../tasks/enable_ps_9x_inn_lts_main_repo.yml + when: lookup('env', 'install_repo') == "main" + + - name: include tasks for enabling PS {{ major_release_version }} test repo + include_tasks: ../tasks/enable_ps_9x_inn_repo_testing_repo.yml + when: lookup('env', 'install_repo') == "testing" or lookup('env', 'install_repo') == "" + + - name: include tasks for enabling PS {{ major_release_version }} experimental repo + include_tasks: ../tasks/enable_ps_9x_inn_lts_experimental_repo.yml + when: lookup('env', 'install_repo') == "experimental" + + - name: download and extract world database + command: "{{ item }}" + with_items: + - wget --no-check-certificate -P /package-testing https://raw.githubusercontent.com/Percona-QA/percona-qa/master/sample_db/world.sql + + - name: install Percona Server {{ major_release_version }} packages + include_tasks: ../tasks/install_ps_innovation_lts.yml + + - name: check telemetry (enabled) + command: /package-testing/check_telemetry.sh ps -e + + - name: install sysbench new deb packages + include_tasks: ../tasks/install_sysbench.yml + when: lookup('env', 'install_repo') != "experimental" + + - name: install Percona XtraBackup {{ major_release_version }} packages + include_tasks: ../tasks/install_pxb_innovation_lts.yml + when: lookup('env', 'install_repo') != "experimental" + + - name: list installed packages + include_tasks: ../tasks/list_installed_packages.yml + + - name: start mysql service with service command + command: service mysql start + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "6" + + - name: start mysql service with systemctl command + command: systemctl start mysql + when: (ansible_distribution == "Amazon") or (ansible_os_family == "RedHat" and ansible_distribution_major_version|int >= 7) + + - name: set root password on centos + command: /package-testing/setpass_57.sh + when: ansible_os_family == "RedHat" + + - name: disable selinux on centos7 for TokuDB to work + shell: setenforce 0 || true + when: ansible_os_family == "RedHat" + + - name: run Group Replication tests + include_tasks: ../tasks/gr_test.yml + + - name: append include for RedHat + lineinfile: + path: /etc/my.cnf + line: '!includedir /etc/my.cnf.d' + when: ansible_os_family == "RedHat" + + - name: install percona-mysql-shell package + include_tasks: ../tasks/install_pshell.yml + when: install_mysql_shell == "yes" or install_mysql_shell == "" + + - name: check that Percona Server package versions are correct for ps{{ major_release_version }} + command: /package-testing/package_check.sh ps{{ major_release_version }} + + - name: Handle check that Percona Server version is correct + block: + - name: Run the version_check.sh script for ps{{ major_release_version }} + shell: /package-testing/version_check.sh ps{{ major_release_version }} > version-check.log 2>&1 + + - name: Log check for warnings in the previous stage + command: /package-testing/scripts/log-warning-check.sh version-check.log + when: (lookup('env', 'check_warnings') == "yes") + + rescue: + - name: Fetch the output of the version_check.sh logfile on the script failure + command: cat "version-check.log" + register: versioncheckoutput + + - name: Display the fetched output of the version_check.log logfile + debug: + msg: "Version check output: {{ versioncheckoutput.stdout }}" + + - name: Fail the task due to previous issues + fail: + msg: Failing the further tasks due to issues in the previous task. + + #- name: keyring Vault Component and plugins test + #include_tasks: ../tasks/ps_keyring_vault_component_test.yml + + - name: re-run ps_admin to install rocksdb + command: /usr/bin/ps-admin --enable-rocksdb + + - name: install plugins, import world database ps-{{ major_release_version }} + command: /package-testing/plugins_test_innovation_lts.sh ps + + - name: check the clone plugin + command: /package-testing/scripts/ps_clone_plugin_test_innovation_lts.sh + + - name: check the data masking component + command: /package-testing/scripts/ps_dm_component.sh + + - name: check the audit log v2 Component + command: /package-testing/scripts/ps_audit_log_v2_component.sh + + - name: run some MyRocks tests + command: /package-testing/scripts/ps_myrocks_test.sh + + - name: run mysql compression tests script + command: /package-testing/scripts/mysql-comp-test/mysql_comp_test.sh ps{{ major_release_version }} + + - name: run bats unit tests for ps-admin script + command: /usr/local/bin/bats /package-testing/bats/ps-admin_unit.bats + + - name: run bats integration tests for ps-admin script + command: /usr/local/bin/bats /package-testing/bats/ps-admin_integration.bats + + - name: run PAM tests + include_tasks: ../tasks/pam_test.yml + + - name: install 3rd party packages with apt + apt: + name: "{{ packages }}" + vars: + packages: + - rsyslog-mysql + when: ansible_os_family == "Debian" + + - name: install 3rd party packages with yum + yum: + name: "{{ packages }}" + vars: + packages: + - rsyslog-mysql + when: ansible_os_family == "RedHat" + + - name: list installed packages + include_tasks: ../tasks/list_installed_packages.yml + + - name: run bats tests for mysql init scripts + command: /usr/local/bin/bats /package-testing/bats/mysql-init-scripts.bats + + - name: start mysql service + service: name=mysql state=started + + # - name: check that mysqladmin shutdown works correctly + # command: /package-testing/madmin_check.sh + + - name: disable all percona repos + command: percona-release disable all + + - name: get my.cnf stats + stat: path=/etc/my.cnf + register: mycnf + + - name: copy config file to backup + copy: + src: /etc/my.cnf + dest: /etc/my.cnf.backup + remote_src: yes + when: mycnf.stat.exists and ansible_os_family == "RedHat" + + - name: remove Percona Server deb packages + apt: + name: "{{ packages }}" + update_cache: no + state: absent + vars: + packages: + - percona-server* + when: ansible_os_family == "Debian" + + - name: remove Percona Server rpm packages + yum: + name: "{{ packages }}" + state: absent + vars: + packages: + - percona-server* + when: ansible_os_family == "RedHat" + + - name: check if process is stopped after package removal + command: /package-testing/check_running.sh mysql stopped + + - stat: + path: /var/lib/mysql + register: p + + - name: check /var/lib/mysql exists and not empty + fail: + msg: "Path exists and is a directory and is not empty" + when: p.stat.isdir is defined and p.stat.isdir and p.stat.size > 1000000 \ No newline at end of file diff --git a/scripts/mysql-comp-test/mysql_comp_test.sh b/scripts/mysql-comp-test/mysql_comp_test.sh index 5b0b8c232..03e2a8a94 100755 --- a/scripts/mysql-comp-test/mysql_comp_test.sh +++ b/scripts/mysql-comp-test/mysql_comp_test.sh @@ -3,10 +3,10 @@ set -e if [ "$#" -ne 1 ]; then - echo "This script requires product parameter: ps56, ps57 or ps8x !" + echo "This script requires product parameter: ps56, ps57 or ps8x or ps9x!" echo "Usage: ./comp_test.sh " exit 1 -elif ! [[ "$1" =~ ^ps5[6-7]{1}$ || "$1" =~ ^ps8[0-9]{1}$i ]]; then +elif ! [[ "$1" =~ ^ps5[6-7]{1}$ || "$1" =~ ^ps8[0-9]{1}$i || "$1" =~ ^ps9[0-9]{1}$i ]]; then echo "Product not recognized!" exit 1 fi @@ -55,8 +55,8 @@ for se in TokuDB RocksDB; do if [[ ${se} = "TokuDB" && " ${tokudb_comp_lib[@]} " =~ " ${comp_lib} " ]] || [[ ${se} = "RocksDB" && " ${rocksdb_comp_lib[@]} " =~ " ${comp_lib} " ]]; then if [ $1 = "ps56" -a ${se} = "RocksDB" ]; then echo "Skipping RocksDB since not supported in PS 5.6" - elif [[ "$1" =~ ^ps8[0-9]{1}$ ]] && [[ ${se} = "TokuDB" ]]; then - echo "Skipping TokuDB since not supported in PS 8.0 and PS 8.1" + elif [[ "$1" =~ ^ps8[0-9]{1}$ ]] || [[ "$1" =~ ^ps9[0-9]{1}$ ]] && [[ ${se} = "TokuDB" ]]; then + echo "Skipping TokuDB since not supported in PS 9.X and PS 8.X" else if [ ${comp_lib} != "dummy" ]; then old="${new}" @@ -106,10 +106,10 @@ for se in TokuDB RocksDB; do sed -i "s/ @@COMMENT@@/ ${new_comment}/g" /tmp/create_table.sql fi - if ! [[ "$1" =~ ^ps8[0-9]{1}$ ]]; then + if ! [[ "$1" =~ ^ps8[0-9]{1}$ ]] || [[ "$1" =~ ^ps9[0-9]{1}$ ]]; then mysql -e "set global tokudb_row_format=${new_row_format};" else - echo "Skipping TokuDB since not supported in PS 8.0 and PS 8.1" + echo "Skipping TokuDB since not supported in PS 9.0 and PS 8.0" fi mysql < /tmp/create_table.sql fi @@ -179,7 +179,7 @@ for file in /var/lib/mysql/.rocksdb/*.sst; do done # check if TokuDB files contain proper compression libraries used -if ! [[ "$1" =~ ^ps8[0-9]{1}$ ]]; then +if ! [[ "$1" =~ ^ps8[0-9]{1}$ ]] || [[ "$1" =~ ^ps9[0-9]{1}$ ]] ; then for file in /var/lib/mysql/comp_test/*TokuDB*_main_*.tokudb; do filename_comp=$(echo "${file}" | sed "s:/.*/::" | sed "s:.*TokuDB_::" | sed "s:_main_.*::" | sed "s:_P_.*::") @@ -203,7 +203,7 @@ sed -i '/^rocksdb/d' ${MYCNF} nr1=$(grep -c "e7821682046d961fb2b5ff5d11894491" /tmp/comp_test_md5.sum) nr2=$(grep -c "3284a0c3a1f439892f6e07f75408b2c2" /tmp/comp_test_md5.sum) nr3=$(grep -c "72f7e51a16c2f0af31e39586b571b902" /tmp/comp_test_md5.sum) -if ! [[ "$1" =~ ^ps8[0-9]{1}$ ]]; then +if ! [[ "$1" =~ ^ps8[0-9]{1}$ ]] || [[ "$1" =~ ^ps9[0-9]{1}$ ]]; then if [ ${nr1} -ne 24 -o ${nr2} -ne 24 -o ${nr3} -ne 24 ]; then echo "md5sums of test files do not match. check files in ${secure_file_priv}" exit 1 @@ -217,4 +217,4 @@ elif [ ${nr1} -ne 11 -o ${nr2} -ne 11 -o ${nr3} -ne 11 ]; then else echo "md5sums of test files match" exit 0 -fi +fi \ No newline at end of file diff --git a/scripts/ps_keyring_plugins_test/ps_keyring_plugins_test_innovation_lts.sh b/scripts/ps_keyring_plugins_test/ps_keyring_plugins_test_innovation_lts.sh index 27ba4d314..dd4ceea67 100755 --- a/scripts/ps_keyring_plugins_test/ps_keyring_plugins_test_innovation_lts.sh +++ b/scripts/ps_keyring_plugins_test/ps_keyring_plugins_test_innovation_lts.sh @@ -11,9 +11,9 @@ LOG="/tmp/keyring_plugins_test_run.log" echo -n > ${LOG} if [ -z "$1" ]; then - echo "This script needs parameter ps57|ps80|ps81|ps82" + echo "This script needs parameter ps57|ps80|ps81|ps82|ps90" exit 1 -elif ! [[ "$1" =~ ^ps8[0-9]{1}$ ]]; then +elif ! [[ "$1" =~ ^ps9[0-9]{1}$ ]] || [[ "$1" =~ ^ps8[0-9]{1}$ ]]; then echo "Version not recognized!" exit 1 #else @@ -70,4 +70,4 @@ sleep 5 systemctl start mysql -sleep 10 +sleep 10 \ No newline at end of file diff --git a/tasks/enable_ps_9x_inn_lts_experimental_repo.yml b/tasks/enable_ps_9x_inn_lts_experimental_repo.yml new file mode 100644 index 000000000..c4be76e58 --- /dev/null +++ b/tasks/enable_ps_9x_inn_lts_experimental_repo.yml @@ -0,0 +1,33 @@ + - name: include playbook for removing Percona repo + include_tasks: remove_percona_repository.yml + + - name: disable the mysql module on RHEL/CentOS 8 + command: /usr/bin/dnf module disable mysql -y + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: Install percona repository package + apt: + deb: https://repo.percona.com/apt/percona-release_latest.generic_all.deb + when: ansible_os_family == "Debian" + + - name: add the Percona testing yum repos for CentOS + yum: name=https://repo.percona.com/yum/percona-release-latest.noarch.rpm + when: ansible_os_family == "RedHat" + + - name: Add ARM support into percona-release + shell: sed -i "s|x86_64|x86_64 aarch64|" /usr/bin/percona-release + when: ansible_architecture == "aarch64" or ansible_architecture == "arm64" + + - name: enable the ps-9x-innovation experimental repo + command: percona-release enable-only ps-9x-innovation experimental + + - name: enable tools experimental repo + command: percona-release enable tools experimental + + - name: clean and update yum cache + shell: | + yum clean all + yum makecache + when: ansible_os_family == "RedHat" + + \ No newline at end of file diff --git a/tasks/enable_ps_9x_inn_lts_main_repo.yml b/tasks/enable_ps_9x_inn_lts_main_repo.yml new file mode 100644 index 000000000..36da49a0d --- /dev/null +++ b/tasks/enable_ps_9x_inn_lts_main_repo.yml @@ -0,0 +1,58 @@ + - name: include playbook for removing Percona repo + include_tasks: remove_percona_repository.yml + + - name: disable the mysql module on RHEL/CentOS 8 + command: /usr/bin/dnf module disable mysql -y + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: Receive GPG key 1 + command: "gpg --batch --keyserver keyserver.ubuntu.com --recv-keys {{ percona_key1 }}" + environment: + GNUPGHOME: "{{ gnupg_home }}" + when: ansible_os_family == "RedHat" + + - name: Export GPG key 1 + command: "gpg --batch --export --armor {{ percona_key1 }}" + register: gpg_key1 + environment: + GNUPGHOME: "{{ gnupg_home }}" + when: ansible_os_family == "RedHat" + + - name: Save GPG key 1 to file + copy: + content: "{{ gpg_key1.stdout }}" + dest: "{{ percona_key1_file }}" + mode: '0644' + when: ansible_os_family == "RedHat" + + - name: Import GPG keys with rpmkeys + command: "rpmkeys --import {{ percona_key1_file }}" + when: ansible_os_family == "RedHat" + + - name: Install percona repository package + apt: +# deb: https://repo.percona.com/apt/pool/testing/p/percona-release/percona-release_1.0-21.generic_all.deb + deb: https://repo.percona.com/apt/percona-release_latest.generic_all.deb + when: ansible_os_family == "Debian" + + - name: Add the Percona Release yum repo without GPG check + yum: + name: https://repo.percona.com/yum/percona-release-latest.noarch.rpm + disable_gpg_check: yes + when: ansible_os_family == "RedHat" + + - name: Add ARM support into percona-release + shell: sed -i "s|x86_64|x86_64 aarch64|" /usr/bin/percona-release + when: ansible_architecture == "aarch64" or ansible_architecture == "arm64" + + - name: enable the PS-90 main repo + command: percona-release enable-only ps-90 release + +# - name: enable the tools main repo +# command: percona-release enable tools release + + - name: clean and update yum cache + shell: | + yum clean all + yum makecache + when: ansible_os_family == "RedHat" \ No newline at end of file diff --git a/tasks/enable_ps_9x_inn_lts_testing_repo.yml b/tasks/enable_ps_9x_inn_lts_testing_repo.yml new file mode 100644 index 000000000..3c4ae0a7f --- /dev/null +++ b/tasks/enable_ps_9x_inn_lts_testing_repo.yml @@ -0,0 +1,59 @@ + - name: include playbook for removing Percona repo + include_tasks: remove_percona_repository.yml + + - name: disable the mysql module on RHEL/CentOS 8 + command: /usr/bin/dnf module disable mysql -y + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: Install percona repository package for Debain + apt: + deb: https://repo.percona.com/apt/percona-release_latest.generic_all.deb +# deb: https://repo.percona.com/apt/pool/testing/p/percona-release/percona-release_1.0-21.generic_all.deb + when: ansible_os_family == "Debian" + + - name: Receive GPG key 1 + command: "gpg --batch --keyserver keyserver.ubuntu.com --recv-keys {{ percona_key1 }}" + environment: + GNUPGHOME: "{{ gnupg_home }}" + when: ansible_os_family == "RedHat" + + - name: Export GPG key 1 + command: "gpg --batch --export --armor {{ percona_key1 }}" + register: gpg_key1 + environment: + GNUPGHOME: "{{ gnupg_home }}" + when: ansible_os_family == "RedHat" + + - name: Save GPG key 1 to file + copy: + content: "{{ gpg_key1.stdout }}" + dest: "{{ percona_key1_file }}" + mode: '0644' + when: ansible_os_family == "RedHat" + + - name: Import GPG keys with rpmkeys + command: "rpmkeys --import {{ percona_key1_file }}" + when: ansible_os_family == "RedHat" + + - name: Install percona repository package for RHEL + yum: name=https://repo.percona.com/yum/percona-release-latest.noarch.rpm + when: ansible_os_family == "RedHat" + + - name: Add ARM support into percona-release + shell: sed -i "s|x86_64|x86_64 aarch64|" /usr/bin/percona-release + when: ansible_architecture == "aarch64" or ansible_architecture == "arm64" + + - name: enable the PS-90 testing repo + command: percona-release enable-only ps-90 testing + + - name: clean and update yum cache + shell: | + yum clean all + yum makecache + when: ansible_os_family == "RedHat" + + - name: Update APT cache + apt: + update_cache: yes + when: ansible_os_family == "Debian" + \ No newline at end of file diff --git a/tasks/test_prep.yml b/tasks/test_prep.yml index 0b0d71856..1d24c84bc 100644 --- a/tasks/test_prep.yml +++ b/tasks/test_prep.yml @@ -225,8 +225,8 @@ - rm -f master.zip - mv "package-testing-{{ branch }}" /package-testing vars: - branch: "{{ lookup('env', 'TESTING_BRANCH') | default('master', true) }}" - git_account: "{{ lookup('env', 'TESTING_GIT_ACCOUNT') | default('Percona-QA', true) }}" + branch: "{{ lookup('env', 'TESTING_BRANCH') | default('add-ps-90-pt-support', true) }}" + git_account: "{{ lookup('env', 'TESTING_GIT_ACCOUNT') | default('Grishma123-Eng', true) }}" - name: install latest bats from github command: "{{ item }}" diff --git a/test_prep.yml b/test_prep.yml new file mode 100644 index 000000000..2fee8df71 --- /dev/null +++ b/test_prep.yml @@ -0,0 +1,264 @@ + - name: DEBUG + debug: + var: ansible_facts['distribution'] + + - name: Execute Bash command if the system is Red Hat-based + shell: | + echo "This is a Red Hat-based system" + # Add your Bash command here + when: ansible_facts['distribution'] == "RedHat" + + - name: Execute Bash command if the system is Oracle Linux-based + shell: | + echo "This is an Oracle Linux-based system" + # Add your Bash command here + when: ansible_facts['distribution'] == "OracleLinux" + + - name: Execute Bash command if the system is not Red Hat-based nor Oracle Linux-based + shell: | + echo "This is not a Red Hat-based or Oracle Linux-based system" + # Add your Bash command here + when: ansible_facts['distribution'] != "RedHat" and ansible_facts['distribution'] != "OracleLinux" + + - name: Install wget to download RPM packages + yum: + name: wget + state: present + when: + - ansible_facts['distribution'] == "RedHat" + + - name: setup epel release centos 7 + yum: name=https://dl.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm state=present + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7" + + - name: setup epel 7 repo for Amazon Linux 2 + yum: name=https://dl.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm state=present + when: ansible_distribution == "Amazon" and ansible_distribution_major_version == "2" + + - name: install GPG key for epel 8 + rpm_key: + state: present + key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8 + when: + - ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + - ansible_facts['distribution'] != "RedHat" + + - name: install GPG key for Percona repos + rpm_key: + state: present + key: https://repo.percona.com/yum/RPM-GPG-KEY-Percona + when: ansible_os_family == "RedHat" and ansible_distribution_major_version >= "8" + + - name: install GPG key for Percona repos PACKAGING + rpm_key: + state: present + key: https://repo.percona.com/yum/PERCONA-PACKAGING-KEY + when: ansible_os_family == "RedHat" and ansible_distribution_major_version >= "8" + + - name: update mirrors for CentOS8 + shell: sed -i 's/mirror\.centos\.org/vault\.centos\.org/g;s/\#baseurl=/baseurl=/g;s/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS*.repo + when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8" + + - name: update YUM cache for CentOS 8 + yum: + update_cache: yes + state: present + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: install GPG key for epel 8 + rpm_key: + state: present + key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8 + when: + - ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: Yum update for epel 8 + command: yum update -y + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: setup epel 8 repo + yum: name=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm state=present + when: + - ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: install GPG key for epel 9 + rpm_key: + state: present + key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9 + when: + - ansible_os_family == "RedHat" and ansible_distribution_major_version == "9" + - ansible_facts['distribution'] != "RedHat" + + - name: setup epel 9 repo package + yum: name=epel-release state=present + when: + - ansible_os_family == "RedHat" and ansible_distribution_major_version == "9" + - ansible_facts['distribution'] != "RedHat" + + - name: setup epel 9 repo + yum: name=https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm state=present + when: + - ansible_os_family == "RedHat" and ansible_distribution_major_version == "9" + - ansible_facts['distribution'] != "RedHat" + + - name: allow release-info to change for apt repositories + command: apt-get update -y --allow-releaseinfo-change + when: ansible_os_family == "Debian" and ansible_distribution_release == "buster" + + - name: install needed packages for running tests with apt + apt: + name: "{{ packages }}" + update_cache: yes + state: latest + vars: + packages: + - unzip + - wget + - gnupg + - rsync + - jq # for exporter end point metric fetch + - acl + retries: 60 + delay: 10 + register: result + until: result is not failed + when: ansible_os_family == "Debian" + + - name: Clean yum cache + command: yum clean all + when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 7 + + - name: update cache + command: yum update -y + when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 7 + + - name: install needed packages for running tests with yum + yum: + name: "{{ packages }}" + state: latest + vars: + packages: + - pv + - libselinux-python + - unzip + - wget + - rsync + - jq # for exporter end point metric fetch + when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int <= 7 + + - name: install needed packages for running tests with yum on RHEL 8 + yum: + name: "{{ packages }}" + state: latest + vars: + packages: + - unzip + - wget + - jq # for exporter end point metric fetch + when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8 + + - name: Install needed packages for running tests with dnf on RHEL 9 + block: + - name: Install packages using dnf + dnf: + name: + - unzip + - wget + - jq # for exporter endpoint metric fetch + state: latest + register: dnf_result + failed_when: dnf_result is failed + when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 9 + + rescue: + - name: Log DNF failure and switch to yum + debug: + msg: "DNF installation failed. Attempting installation with yum." + + - name: Install packages using yum as fallback + yum: + name: + - unzip + - wget + - jq + state: latest + when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 9 + + - name: register SLES for updates with suse_register + command: suse_register -a email="@@SLES_REG_EMAIL@@" -a regcode-sles=@@SLES_REG_CODE@@ + when: ansible_os_family == "Suse" and ansible_distribution_major_version == "11" + + - name: register SLES for updates with SUSEConnect + command: SUSEConnect --email="@@SLES_REG_EMAIL@@" --regcode=@@SLES_REG_CODE@@ + when: ansible_os_family == "Suse" and ansible_distribution_major_version == "12" + + - name: import rpm gpg key on sles12 + command: rpmkeys --import https://www.percona.com/downloads/RPM-GPG-KEY-percona + when: ansible_os_family == "Suse" and ansible_distribution_major_version == "12" + + - name: get abs path of package-testing into pkg_testing_path variable + shell: echo '{{ hostvars["localhost"]["playbook_dir"] }}' | grep -oE '^.*package-testing' + register: pkg_testing_path_output + when: lookup('env', 'USE_LOCAL_PKG_TEST') == "1" + + - set_fact: + pkg_testing_path: "{{ pkg_testing_path_output.stdout }}" + when: lookup('env', 'USE_LOCAL_PKG_TEST') == "1" + + - name: copy package-testing directory to remote + synchronize: + src: "{{ pkg_testing_path }}" + dest: / + recursive: yes + perms: yes + when: lookup('env', 'USE_LOCAL_PKG_TEST') == "1" + + - name: download package-testing repo branch with wget + command: "{{ item }}" + with_items: + - rm -rf /package-testing + - rm -f master.zip + - wget --no-check-certificate -O master.zip "https://github.com/{{ git_account }}/package-testing/archive/{{ branch }}.zip" + - unzip master.zip + - rm -f master.zip + - mv "package-testing-{{ branch }}" /package-testing + vars: + branch: "{{ lookup('env', 'TESTING_BRANCH') | default('add-ps-90-pt-support', true) }}" + git_account: "{{ lookup('env', 'TESTING_GIT_ACCOUNT') | default('Grishma123-Eng', true) }}" + + - name: install latest bats from github + command: "{{ item }}" + with_items: + - rm -f master.zip + - wget --no-check-certificate -O master.zip https://github.com/sstephenson/bats/archive/master.zip + - unzip master.zip + - rm -f master.zip + - bats-master/install.sh /usr/local + - rm -rf bats-master + + - name: include tasks for listing already installed packages + include_tasks: list_installed_packages.yml + + - name: get selinux status + command: sestatus + register: selinux_status + when: ansible_os_family == "RedHat" + + - name: list selinux status + debug: + var: selinux_status + when: ansible_os_family == "RedHat" + + - name: get list of enabled dnf modules on rhel 8 + command: dnf module list --enabled + register: enabled_dnf_modules + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: list enabled dnf modules on rhel 8 + debug: + var: enabled_dnf_modules + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" + + - name: disable mysql dnf for rhel 8 + shell: dnf module disable mysql -y + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" diff --git a/version_check.sh b/version_check.sh index e3ff2a83b..fde52e4fe 100755 --- a/version_check.sh +++ b/version_check.sh @@ -8,7 +8,7 @@ if [ "$#" = 2 ]; then exit 1 fi elif [ "$#" -ne 1 ]; then - echo "This script requires product parameter: ps56, ps57, ps80, ps81 !" + echo "This script requires product parameter: ps56, ps57, ps80, ps81,ps90 !" echo "Usage: ./version_check.sh [pro]" exit 1 fi @@ -35,7 +35,7 @@ elif [ "$1" = "ps80" ]; then release=${PS80_VER#*-} revision=${PS80_REV} fi -elif [ "$1" = "ps84" ]; then + elif [ "$1" = "ps84" ]; then if [ "$2" = "pro" ]; then version=${PS84_PRO_VER} release=${PS84_PRO_VER#*-} @@ -45,10 +45,10 @@ elif [ "$1" = "ps84" ]; then release=${PS84_VER#*-} revision=${PS84_REV} fi -elif [[ $1 =~ ^ps8[1-9]{1}$ ]]; then +elif [[ $1 =~ ^ps9[0-9]{1}$ ]]; then version=${PS_INN_LTS_VER} release=${PS_INN_LTS_VER#*-} - revision=${PS_INN_LTS_REV} + revision=${PS_INN_LTS_REV} elif [ "$1" = "pxc56" ]; then version=${PXC56_VER%-*} release=${PXC56_VER#*-} @@ -150,7 +150,7 @@ product=$1 log="/tmp/${product}_version_check.log" echo -n > "${log}" -if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9]{1}$ ]]; then +if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9]{1}$ ]] || [[ ${product} =~ ^ps9[0-9]{1}$ ]]; then for i in @@INNODB_VERSION @@VERSION; do if [ "$(mysql -e "SELECT ${i}; "| grep -c "${version}")" = 1 ]; then echo "${i} is correct" >> "${log}" @@ -189,7 +189,7 @@ if [[ ${product} = "ps56" || ${product} = "ps57" ]] || [[ ${product} =~ ^ps8[0-9 fi fi - if [[ ${product} =~ ^ps8[0-9]{1}$ ]]; then + if [[ ${product} =~ ^ps8[0-9]{1}$ ]] || [[ ${product} =~ ^ps9[0-9]{1}$ ]]; then if [ -z ${install_mysql_shell} ] || [ ${install_mysql_shell} = "yes" ] ; then if [ "$(mysqlsh --version | grep -c ${version})" = 1 ]; then echo "mysql-shell version is correct" >> "${log}"