From 35e96e72716643cbbb8dbc4a3db3bd076a90a3f0 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 15 Dec 2016 12:08:13 +0000 Subject: [PATCH] Remove Trusty support from os_ironic Change-Id: I35f90d708cda58c5b09f17e5596cf226d1b16605 Implements: blueprint trusty-removal --- Vagrantfile | 2 +- bindep.txt | 2 +- handlers/main.yml | 1 - meta/main.yml | 1 - tasks/ironic_init_common.yml | 5 ---- tasks/ironic_init_upstart.yml | 31 --------------------- templates/ironic-upstart-init.j2 | 46 -------------------------------- vars/ubuntu-14.04.yml | 43 ----------------------------- 8 files changed, 2 insertions(+), 129 deletions(-) delete mode 100644 tasks/ironic_init_upstart.yml delete mode 100644 templates/ironic-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 02d792c3..080da072 100644 --- a/bindep.txt +++ b/bindep.txt @@ -32,7 +32,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 8685eee2..eb474651 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -17,7 +17,6 @@ service: name: "{{ item }}" state: restarted - pattern: "{{ item }}" with_items: "{{ ironic_service_names }}" failed_when: false diff --git a/meta/main.yml b/meta/main.yml index f4f5b90d..e7700b3f 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -21,7 +21,6 @@ galaxy_info: platforms: - name: Ubuntu versions: - - trusty - xenial categories: - cloud diff --git a/tasks/ironic_init_common.yml b/tasks/ironic_init_common.yml index 856ac0d6..07704ebd 100644 --- a/tasks/ironic_init_common.yml +++ b/tasks/ironic_init_common.yml @@ -13,11 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include: ironic_init_upstart.yml - static: no - when: - - ansible_service_mgr == 'upstart' - - include: ironic_init_systemd.yml static: no when: diff --git a/tasks/ironic_init_upstart.yml b/tasks/ironic_init_upstart.yml deleted file mode 100644 index 5d4a8482..00000000 --- a/tasks/ironic_init_upstart.yml +++ /dev/null @@ -1,31 +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: "ironic-upstart-init.j2" - dest: "/etc/init/{{ program_name }}.conf" - mode: "0644" - owner: "root" - group: "root" - register: upstart_init - notify: - - Restart ironic services - -- name: Reload init scripts - command: initctl reload-configuration - when: upstart_init | changed - notify: - - Restart ironic services diff --git a/templates/ironic-upstart-init.j2 b/templates/ironic-upstart-init.j2 deleted file mode 100644 index 948083e9..00000000 --- a/templates/ironic-upstart-init.j2 +++ /dev/null @@ -1,46 +0,0 @@ -# {{ ansible_managed }} - -# vim:set ft=upstart ts=2 et: - -description "{{ program_name }}" -author "Michael Davies " - -start on runlevel [2345] -stop on runlevel [016] - -respawn -respawn limit 10 5 - -# Set the RUNBIN environment variable -env RUNBIN="{{ ironic_bin }}/{{ program_name }}" -env RUNOPTS="-v -d --config-file /etc/ironic/ironic.conf" - -# Change directory to service users home -chdir "{{ service_home }}" - -# Pre start actions -pre-start script - mkdir -p "/var/run/{{ program_name }}" - chown {{ system_user }}:{{ system_group }} "/var/run/{{ program_name }}" - - mkdir -p "/var/lock/{{ program_name }}" - chown {{ system_user }}:{{ system_group }} "/var/lock/{{ program_name }}" - - . {{ ironic_bin }}/activate - -end script - -# Post stop actions -post-stop script - rm "/var/run/{{ program_name }}/{{ program_name }}.pid" -end script - -# Run the start up job -exec start-stop-daemon --start \ - --chuid {{ system_user }} \ - --make-pidfile \ - --pidfile /var/run/{{ program_name }}/{{ program_name }}.pid \ - --exec "{{ program_override|default('$RUNBIN') }}" \ - -- {{ program_config_options|default('$RUNOPTS') }} \ - --log-file={{ ironic_system_log_folder }}/{{ program_name }}.log - diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml deleted file mode 100644 index 67906e11..00000000 --- a/vars/ubuntu-14.04.yml +++ /dev/null @@ -1,43 +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. - -cache_timeout: 600 - -ironic_developer_mode_distro_packages: - - git-core - -ironic_api_distro_packages: - - apache2 - - apache2-utils - - libapache2-mod-wsgi - -ironic_conductor_distro_packages: - - libxml2-dev - - syslinux - - syslinux-common - - libxslt1-dev - - qemu-utils - - libpq-dev - - python-yaml - - open-iscsi - - ipmitool - - tftpd-hpa - -ironic_conductor_standalone_distro_packages: - - isc-dhcp-server - -ironic_library_modules_paths: - - "/usr/lib/syslinux/pxelinux.0" - - "/usr/lib/syslinux/chain.c32"