From 4318ef6c5a6af6db903cb89aea8fded567ad1bd6 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 15 Dec 2016 10:49:48 +0000 Subject: [PATCH] Remove Trusty support from galera_server role NB There was an issue with https://review.openstack.org/#/c/395932/ which meant that "pid1_name != systemd" got changed to "ansible_service_mgr == systemd" - since we are removing trusty this task has been removed, but a fix for Newton will be made. Change-Id: I2f502737e2cc52678cf479de2ef94b818e253622 Implements: blueprint trusty-removal --- Vagrantfile | 2 +- bindep.txt | 2 +- handlers/main.yml | 2 - meta/main.yml | 1 - tasks/galera_bootstrap.yml | 12 ---- tasks/galera_post_install.yml | 11 ---- vars/ubuntu-14.04.yml | 108 ---------------------------------- 7 files changed, 2 insertions(+), 136 deletions(-) delete mode 100644 vars/ubuntu-14.04.yml diff --git a/Vagrantfile b/Vagrantfile index 54f0e352..6b92f5ba 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,5 +1,5 @@ Vagrant.configure(2) do |config| - config.vm.box = "ubuntu/trusty64" + config.vm.box = "ubuntu/xenial64" config.vm.provider "virtualbox" do |v| v.memory = 2048 v.cpus = 2 diff --git a/bindep.txt b/bindep.txt index a4ec9255..63534ae0 100644 --- a/bindep.txt +++ b/bindep.txt @@ -34,7 +34,7 @@ libselinux-python [platform:rpm] # For SSL SNI support python-pyasn1 [platform:dpkg] python-openssl [platform:dpkg] -python-ndg-httpsclient [platform:ubuntu !platform:ubuntu-trusty] +python-ndg-httpsclient [platform:ubuntu] python2-pyasn1 [platform:rpm] pyOpenSSL [platform:rpm] python-ndg_httpsclient [platform:rpm] diff --git a/handlers/main.yml b/handlers/main.yml index db9bb8bd..18ece015 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -23,7 +23,6 @@ name: mysql state: restarted sleep: 2 - pattern: mysql arguments: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) | ternary('--wsrep-new-cluster', '') }}" environment: MYSQLD_STARTUP_TIMEOUT: 180 @@ -50,7 +49,6 @@ name: mysql state: restarted sleep: 2 - pattern: mysql arguments: "{{ (not galera_existing_cluster | bool and inventory_hostname == galera_server_bootstrap_node) | ternary('--wsrep-new-cluster', '') }}" environment: MYSQLD_STARTUP_TIMEOUT: 180 diff --git a/meta/main.yml b/meta/main.yml index e42487dc..7a9f0c5b 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -22,7 +22,6 @@ galaxy_info: platforms: - name: Ubuntu versions: - - trusty - xenial - name: EL versions: diff --git a/tasks/galera_bootstrap.yml b/tasks/galera_bootstrap.yml index ec4dbc92..2c1e76b5 100644 --- a/tasks/galera_bootstrap.yml +++ b/tasks/galera_bootstrap.yml @@ -40,18 +40,6 @@ tags: - galera-bootstrap -- name: Start cluster with wsrep - service: - name: mysql - state: restarted - arguments: "--wsrep-new-cluster" - when: - - ansible_service_mgr != 'systemd' - - inventory_hostname == galera_server_bootstrap_node - - mysql_running.rc != 0 - tags: - - galera-bootstrap - - name: Wait for operational state command: mysql --silent --skip-column-names -e 'SHOW STATUS LIKE "wsrep_evs_state"' register: galera_check_wait diff --git a/tasks/galera_post_install.yml b/tasks/galera_post_install.yml index ef6aa990..d056da47 100644 --- a/tasks/galera_post_install.yml +++ b/tasks/galera_post_install.yml @@ -79,17 +79,6 @@ tags: - galera-config -- name: Drop limits config (upstart) - template: - src: "upstart.limits.conf.j2" - dest: "/etc/security/limits.conf" - when: - - ansible_service_mgr == 'systemd' - notify: - - Restart mysql - tags: - - galera-config - - name: Create mariadb systemd service config dir file: path: "/etc/systemd/system/mariadb.service.d" diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml deleted file mode 100644 index abb1af43..00000000 --- a/vars/ubuntu-14.04.yml +++ /dev/null @@ -1,108 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -## APT Cache Options -cache_timeout: 600 - -galera_server_distro_package_pins: [{ package: "*", release: MariaDB, priority: "1001" }] - -# Galera GPG Keys -galera_gpg_keys: - - key_name: 'mariadb' - keyserver: 'hkp://keyserver.ubuntu.com:80' - fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80' - hash_id: '0xcbcb082a1bb943db' - - key_name: 'percona-xtrabackup' - keyserver: 'hkp://keyserver.ubuntu.com:80' - fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80' - hash_id: '0x9334a25f8507efa5' - -galera_server_required_distro_packages: - - apt-transport-https - - debconf-utils - - libaio1 - - libc6 - - libdbd-mysql-perl - - libgcc1 - - libgcrypt11 - - libstdc++6 - - python-software-properties - - software-properties-common - -# The package name for mariaDB is set as a variable -# so that it can be used in debconf later in the -# "galera_common" role. -_galera_mariadb_server_package: "mariadb-server-10.1" - -# NB This is specifically galera_server_mariadb_distro_packages as these -# packages only get installed during the galera play - this is because of -# the preseed task and the service startup control used when installing -# mariadb-galera-server and galera. -galera_server_mariadb_distro_packages: - - libmariadbclient-dev - - mariadb-client - - "{{ galera_mariadb_server_package }}" - - galera-3 - - rsync - - socat - -galera_debconf_items: - - question: "mysql-server/root_password" - name: "{{ galera_mariadb_server_package }}" - value: "{{ galera_root_password }}" - vtype: "string" - - question: "mysql-server/root_password_again" - name: "{{ galera_mariadb_server_package }}" - value: "{{ galera_root_password }}" - vtype: "string" - -galera_server_percona_distro_packages: - - qpress - - percona-xtrabackup - -# Validate SSL certificates when downloading the galera deb above -# May be set to "no" when proxy server is intercepting the certificates. -percona_package_download_validate_certs: "yes" -percona_package_url: "{{ percona_arch_url.get( hostvars[physical_host | default(inventory_hostname)]['ansible_architecture'] | lower ) }}" -percona_package_sha256: "{{ percona_arch_sha256.get( hostvars[physical_host | default(inventory_hostname)]['ansible_architecture'] | lower ) }}" -percona_package_path: "/opt/{{ percona_package_url | basename }}" - -percona_arch_url: - x86_64: "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" -percona_arch_sha256: - x86_64: "2f58eedefa905583f0650f77bb2b149139c4066c7fb690202124fe5c7ac83e9e" - -qpress_package_download_validate_certs: yes -qpress_package_url: "{{ qpress_arch_url.get( hostvars[physical_host | default(inventory_hostname)]['ansible_architecture'] | lower ) }}" -qpress_package_sha256: "{{ qpress_arch_sha256.get( hostvars[physical_host | default(inventory_hostname)]['ansible_architecture'] | lower ) }}" -qpress_package_path: "/opt/{{ qpress_package_url | basename }}" - -qpress_arch_url: - x86_64: "https://repo.percona.com/apt/pool/main/q/qpress/qpress_11-1.trusty_amd64.deb" -qpress_arch_sha256: - x86_64: "21e2f4466a1dffd6281d01d0b29388e2a2f0f9c6ba9538b128c34af61b2a4e12" - -# Repositories -galera_percona_xtrabackup_repo_url: "http://repo.percona.com/apt" -galera_percona_xtrabackup_repo: - repo: "deb {{ galera_percona_xtrabackup_repo_url }} {{ ansible_distribution_release }} main" - state: "present" - -_galera_repo_url: "http://mirror.rackspace.com/mariadb/repo/10.1/ubuntu" -galera_repo: - repo: "deb {{ galera_repo_url }} {{ ansible_distribution_release }} main" - state: "present" - -use_percona_upstream: no