From 6683a8db2698c2d66ba4e4dfa144930e5da3815b Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 15 Dec 2016 11:43:33 +0000 Subject: [PATCH] Remove Trusty support from os_cinder role Change-Id: I1959caae206dab450e50dd6f9d7a11137f1d8281 Implements: blueprint trusty-removal --- Vagrantfile | 2 +- bindep.txt | 2 +- handlers/main.yml | 8 ------ meta/main.yml | 1 - tasks/cinder_init_common.yml | 4 --- tasks/cinder_init_upstart.yml | 28 --------------------- templates/cinder-upstart-init.j2 | 42 -------------------------------- vars/ubuntu-14.04.yml | 39 ----------------------------- 8 files changed, 2 insertions(+), 124 deletions(-) delete mode 100644 tasks/cinder_init_upstart.yml delete mode 100644 templates/cinder-upstart-init.j2 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 f8d80fde..67a9f69c 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 eb99137c..33de479d 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -18,17 +18,10 @@ notify: - Restart cinder services -- name: Reload upstart init scripts - command: initctl reload-configuration - changed_when: false - notify: - - Restart cinder services - - name: Restart cinder services service: name: "{{ item.value.service_name }}" state: restarted - pattern: "{{ item.value.service_name }}" with_dict: "{{ cinder_services }}" when: - inventory_hostname in groups[item.value.group] @@ -38,4 +31,3 @@ service: name: "{{ tgt_service_name }}" state: restarted - pattern: tgtd diff --git a/meta/main.yml b/meta/main.yml index c5b86ec2..ee9630e3 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/cinder_init_common.yml b/tasks/cinder_init_common.yml index 901abbfb..19bc3c20 100644 --- a/tasks/cinder_init_common.yml +++ b/tasks/cinder_init_common.yml @@ -14,10 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: cinder_init_upstart.yml - when: - - ansible_service_mgr == 'upstart' - - include: cinder_init_systemd.yml when: - ansible_service_mgr == 'systemd' diff --git a/tasks/cinder_init_upstart.yml b/tasks/cinder_init_upstart.yml deleted file mode 100644 index 7105a638..00000000 --- a/tasks/cinder_init_upstart.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# Copyright 2014, 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. - -- name: Place the init script - template: - src: "cinder-upstart-init.j2" - dest: "/etc/init/{{ item.value.service_name }}.conf" - mode: "0644" - owner: "root" - group: "root" - with_dict: "{{ cinder_services }}" - when: - - inventory_hostname in groups[item.value.group] - - "{{ item.value.condition | default(true) }}" - notify: - - Reload upstart init scripts diff --git a/templates/cinder-upstart-init.j2 b/templates/cinder-upstart-init.j2 deleted file mode 100644 index ed44b312..00000000 --- a/templates/cinder-upstart-init.j2 +++ /dev/null @@ -1,42 +0,0 @@ -# {{ ansible_managed }} - -description "{{ item.value.service_name }}" -author "Kevin Carter " - -start on runlevel [2345] -stop on runlevel [016] - -respawn -respawn limit 10 5 - -# Set the RUNBIN environment variable -env RUNBIN="{{ cinder_bin }}/{{ item.value.service_name }}" - -# Change directory to service users home -chdir "{{ cinder_system_home_folder }}" - -# Pre start actions -pre-start script - mkdir -p "/var/run/{{ item.value.service_name }}" - chown {{ cinder_system_user_name }}:{{ cinder_system_group_name }} "/var/run/{{ item.value.service_name }}" - - mkdir -p "/var/lock/{{ item.value.service_name }}" - chown {{ cinder_system_user_name }}:{{ cinder_system_group_name }} "/var/lock/{{ item.value.service_name }}" - - . {{ cinder_bin }}/activate - -end script - -# Post stop actions -post-stop script - rm "/var/run/{{ item.value.service_name }}/{{ item.value.service_name }}.pid" -end script - -# Run the start up job -exec start-stop-daemon --start \ - --chuid {{ cinder_system_user_name }} \ - --make-pidfile \ - --pidfile /var/run/{{ item.value.service_name }}/{{ item.value.service_name }}.pid \ - --exec "{{ program_override|default('$RUNBIN') }}" \ - -- {{ program_config_options|default('') }} \ - --log-file=/var/log/cinder/{{ item.value.service_name }}.log diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml deleted file mode 100644 index f09cb8a5..00000000 --- a/vars/ubuntu-14.04.yml +++ /dev/null @@ -1,39 +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 - -# service names -tgt_service_name: tgt - -# Common apt packages -cinder_distro_packages: - - libpq-dev - - libkmod-dev - - libkmod2 - - libxslt1-dev - - nfs-common - - rpcbind - - zlib1g - - zlibc - -cinder_volume_distro_packages: - - qemu-utils - -cinder_lvm_volume_distro_packages: - - dmeventd - - parted - - tgt