From 113597a7cf16c9ae791cc412b2e1a07188b28fd5 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 22 Oct 2015 21:12:34 -0500 Subject: [PATCH] Pinned percona-xtrabackup to ensure stability This change makes it so that the xtrabackup plugin is pinned to a specific version via downloading the deb. This reinstates the galera affinity values for testing so that we're not skipping potentially broken code paths. Related-Bug: #1508411 Related-Bug: #1508448 Related-Bug: #1508450 Change-Id: I288d6d9871eb9dfe0ecc547e50639078afdff79d Signed-off-by: Kevin Carter --- playbooks/roles/galera_client/defaults/main.yml | 11 ++++++++++- .../galera_client/tasks/galera_client_install.yml | 7 +++++++ .../tasks/galera_client_pre_install.yml | 13 +++++++++++++ playbooks/roles/galera_server/defaults/main.yml | 13 +++++++++++-- .../roles/galera_server/tasks/galera_install.yml | 7 +++++++ .../galera_server/tasks/galera_pre_install.yml | 13 +++++++++++++ playbooks/roles/repo_server/defaults/main.yml | 2 +- scripts/gate-check-commit.sh | 2 +- 8 files changed, 63 insertions(+), 5 deletions(-) diff --git a/playbooks/roles/galera_client/defaults/main.yml b/playbooks/roles/galera_client/defaults/main.yml index b052d8b926..03ead4b590 100644 --- a/playbooks/roles/galera_client/defaults/main.yml +++ b/playbooks/roles/galera_client/defaults/main.yml @@ -39,10 +39,19 @@ galera_client_apt_percona_xtrabackup_repo: repo: "deb {{ galera_client_apt_percona_xtrabackup_url }} {{ ansible_distribution_release }} main" state: "present" +galera_client_package_url: "https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.2.13/binary/debian/trusty/x86_64/percona-xtrabackup-22_2.2.13-1.trusty_amd64.deb" +galera_client_package_sha256: "2f58eedefa905583f0650f77bb2b149139c4066c7fb690202124fe5c7ac83e9e" +galera_client_package_path: "/opt/{{ galera_client_package_url | basename }}" + galera_client_apt_packages: + - libaio1 + - libc6 + - libdbd-mysql-perl + - libgcc1 + - libgcrypt11 - libmariadbclient-dev + - libstdc++6 - mariadb-client - - percona-xtrabackup galera_client_pip_packages: - MySQL-python diff --git a/playbooks/roles/galera_client/tasks/galera_client_install.yml b/playbooks/roles/galera_client/tasks/galera_client_install.yml index 802918d740..ad0a7ca845 100644 --- a/playbooks/roles/galera_client/tasks/galera_client_install.yml +++ b/playbooks/roles/galera_client/tasks/galera_client_install.yml @@ -36,6 +36,13 @@ tags: - galera-client-apt-packages +- name: Install galera package + apt: + deb: "{{ galera_client_package_path }}" + force: yes + tags: + - galera-client-apt-packages + - name: Install pip packages pip: name: "{{ item }}" diff --git a/playbooks/roles/galera_client/tasks/galera_client_pre_install.yml b/playbooks/roles/galera_client/tasks/galera_client_pre_install.yml index e515e0c531..ecc745c6b3 100644 --- a/playbooks/roles/galera_client/tasks/galera_client_pre_install.yml +++ b/playbooks/roles/galera_client/tasks/galera_client_pre_install.yml @@ -63,3 +63,16 @@ - "{{ galera_client_apt_percona_xtrabackup_repo }}" tags: - galera-client-repos + +- name: Download the galera package + get_url: + url: "{{ galera_client_package_url }}" + dest: "{{ galera_client_package_path }}" + mode: "0644" + sha256sum: "{{ galera_client_package_sha256 }}" + register: package_download + retries: 3 + delay: 10 + until: package_download|success + tags: + - galera-client-apt-packages diff --git a/playbooks/roles/galera_server/defaults/main.yml b/playbooks/roles/galera_server/defaults/main.yml index e6a5604501..d8dd40c6d6 100644 --- a/playbooks/roles/galera_server/defaults/main.yml +++ b/playbooks/roles/galera_server/defaults/main.yml @@ -87,15 +87,25 @@ galera_apt_percona_xtrabackup_repo: repo: "deb {{ galera_apt_percona_xtrabackup_url }} {{ ansible_distribution_release }} main" state: "present" +galera_package_url: "https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.2.13/binary/debian/trusty/x86_64/percona-xtrabackup-22_2.2.13-1.trusty_amd64.deb" +galera_package_sha256: "2f58eedefa905583f0650f77bb2b149139c4066c7fb690202124fe5c7ac83e9e" +galera_package_path: "/opt/{{ galera_package_url | basename }}" + galera_pip_packages: - MySQL-python - python-memcached - pycrypto galera_pre_apt_packages: + - debconf-utils + - libaio1 + - libc6 + - libdbd-mysql-perl + - libgcc1 + - libgcrypt11 + - libstdc++6 - python-software-properties - software-properties-common - - debconf-utils # The package name for mariaDB is set as a variable # so that it can be used in debconf later in the @@ -111,7 +121,6 @@ galera_apt_packages: - galera-3 - qpress - rsync - - percona-xtrabackup - socat galera_debconf_items: diff --git a/playbooks/roles/galera_server/tasks/galera_install.yml b/playbooks/roles/galera_server/tasks/galera_install.yml index 3a84685ba2..5d25320f6b 100644 --- a/playbooks/roles/galera_server/tasks/galera_install.yml +++ b/playbooks/roles/galera_server/tasks/galera_install.yml @@ -47,6 +47,13 @@ tags: - galera-apt-packages +- name: Install galera package + apt: + deb: "{{ galera_package_path }}" + force: yes + tags: + - galera-client-apt-packages + - name: Install pip packages pip: name: "{{ item }}" diff --git a/playbooks/roles/galera_server/tasks/galera_pre_install.yml b/playbooks/roles/galera_server/tasks/galera_pre_install.yml index 7298eadc8b..b9b79c6bed 100644 --- a/playbooks/roles/galera_server/tasks/galera_pre_install.yml +++ b/playbooks/roles/galera_server/tasks/galera_pre_install.yml @@ -88,6 +88,19 @@ tags: - galera-repos +- name: Download the galera package + get_url: + url: "{{ galera_package_url }}" + dest: "{{ galera_package_path }}" + mode: "0644" + sha256sum: "{{ galera_package_sha256 }}" + register: package_download + retries: 3 + delay: 10 + until: package_download|success + tags: + - galera-apt-packages + - name: Prevent galera from starting on install copy: src: "policy-rc.d" diff --git a/playbooks/roles/repo_server/defaults/main.yml b/playbooks/roles/repo_server/defaults/main.yml index 963d61bd6c..0cc28bc055 100644 --- a/playbooks/roles/repo_server/defaults/main.yml +++ b/playbooks/roles/repo_server/defaults/main.yml @@ -66,7 +66,7 @@ repo_apt_packages: - libkrb5-dev - libkmod2 - libvirt-dev - - libmysqlclient-dev + - libmariadbclient-dev - lxc-dev - lvm2 - python-dev diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index d1a12a4fa0..bda22e4a0c 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -76,7 +76,7 @@ if [ -f /etc/nodepool/provider -a -s /etc/nodepool/provider ]; then # Reduce container affinities as Liberty appears to consume # a greater volume of resources, causing greater numbers # of failures with the default affinities. - for container_type in rabbit_mq repo galera horizon keystone; do + for container_type in rabbit_mq repo horizon keystone; do export "NUM_${container_type}_CONTAINER=1" done