Remove Trusty support from os_swift role

As a part of removing Trusty from OpenStack-Ansible we shall aim to
remove this from all the roles.

Testing has already been removed for Trusty in the integrated build and
all individual repositories on master (Ocata), as such we can now go
ahead and remove the support within the roles.

Change-Id: I89ba35fd15703aba2a05d11d4550690704bdf272
Implements: blueprint trusty-removal
This commit is contained in:
Andy McCrae 2016-12-08 11:47:35 +00:00
parent 3a64525c11
commit 26bd8127b6
7 changed files with 6 additions and 86 deletions

2
Vagrantfile vendored
View File

@ -1,5 +1,5 @@
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box = "ubuntu/xenial64"
config.vm.provision "shell", inline: <<-SHELL
sudo su -
cd /vagrant

View File

@ -212,7 +212,7 @@ swift_rabbitmq_telemetry_use_ssl: "False"
# This var is calculated by the play itself, and should not need to be set
# It is defaulted for the benefit of the swift_proxy host which needs it
# for the swift-init-upstart.j2 template file.
# for the swift-init-systemd.j2 template file.
swift_dedicated_replication: False
swift_service_in_ldap: false

View File

@ -18,11 +18,6 @@
notify:
- Restart swift services
- name: Reload upstart init scripts
command: initctl reload-configuration
notify:
- Restart swift services
- name: Restart swift services
service:
name: "{{ item.value.program_name }}"

View File

@ -22,7 +22,10 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- trusty
- xenial
- name: CentOS
versions:
- 7
categories:
- cloud
- python

View File

@ -13,11 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- include: swift_init_upstart.yml
static: no
when:
- ansible_service_mgr == 'upstart'
- include: swift_init_systemd.yml
static: no
when:

View File

@ -1,26 +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: "swift-upstart-init.j2"
dest: "/etc/init/{{ item.value.program_name }}.conf"
mode: "0644"
owner: "root"
group: "root"
with_dict: "{{ swift_services }}"
when: inventory_hostname in groups[item.value.group]
notify:
- Reload upstart init scripts

View File

@ -1,47 +0,0 @@
# {{ ansible_managed }}
description "{{ item.value.program_name }}"
author "Kevin Carter <kevin.carter@rackspace.com>"
start on runlevel [2345]
stop on runlevel [016]
respawn
respawn limit 10 5
# Set the RUNBIN environment variable
env RUNBIN="{{ swift_bin }}/{{ item.value.program_binary | default(item.value.program_name) }}"
{% if swift_pypy_enabled %}
{% if swift_pypy_gc_min is defined %}
env PYPY_GC_MIN={{ swift_pypy_gc_min }}
{% endif %}
{% if swift_pypy_gc_max is defined %}
env PYPY_GC_MAX={{ swift_pypy_gc_max }}
{% endif %}
{% endif %}
# Change directory to service users home
chdir "{{ swift_system_home_folder }}"
# Pre start actions
pre-start script
mkdir -p "/var/run/{{ item.value.program_binary | default(item.value.program_name) }}"
chown {{ swift_system_user_name }}:{{ swift_system_group_name }} "/var/run/{{ item.value.program_binary | default(item.value.program_name) }}"
mkdir -p "/var/lock/{{ item.value.program_binary | default(item.value.program_name) }}"
chown {{ swift_system_user_name }}:{{ swift_system_group_name }} "/var/lock/{{ item.value.program_binary | default(item.value.program_name) }}"
. {{ swift_bin }}/activate
end script
# Post stop actions
post-stop script
rm "/var/run/{{ item.value.program_binary | default(item.value.program_name) }}/{{ item.value.program_name }}.pid"
end script
# Run the start up job
exec start-stop-daemon --start \
--chuid {{ swift_system_user_name }} \
--make-pidfile \
--pidfile /var/run/{{ item.value.program_binary | default(item.value.program_name) }}/{{ item.value.program_name }}.pid \
--exec "{{ item.value.program_override|default('$RUNBIN') }}" "{{ item.value.program_config_options|default('') }}"