Remove Trusty support from os_nova role

Change-Id: Ib0747040d6b53cbb7aec67cfaceae6cc1efb1abc
Implements: blueprint trusty-removal
This commit is contained in:
Andy McCrae 2016-12-15 12:26:02 +00:00
parent 3916b54297
commit 167fe1b74a
12 changed files with 4 additions and 215 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.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2

View File

@ -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]

View File

@ -11,7 +11,7 @@ Nova role for OpenStack-Ansible
:tags: openstack, nova, cloud, ansible
:category: \*nix
This role will install the following Upstart services:
This role will install the following Systemd services:
* nova-server
* nova-compute

View File

@ -18,22 +18,15 @@
notify:
- Restart nova services
- name: Reload upstart init scripts
command: initctl reload-configuration
notify:
- Restart nova services
- name: Restart libvirt-bin
service:
name: "{{ libvirt_service_name }}"
state: "restarted"
pattern: "{{ libvirt_service_name }}"
- name: Restart nova services
service:
name: "{{ item.value.service_name }}"
state: "restarted"
pattern: "{{ item.value.service_name }}"
with_dict: "{{ nova_services }}"
when:
- inventory_hostname in groups[item.value.group]

View File

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

View File

@ -59,7 +59,7 @@
- name: Set libvirt runtime options when listening on tcp (Ubuntu)
lineinfile:
dest: "/etc/default/libvirt-bin"
line: 'libvirtd_opts="{% if ansible_service_mgr != "systemd" %}-d{% endif%} -l"'
line: 'libvirtd_opts="-l"'
regexp: "^libvirtd_opts="
backup: "yes"
when:
@ -70,20 +70,6 @@
- nova-kvm
- nova-libvirt
- name: Set libvirt runtime options when not listening on tcp (Ubuntu)
lineinfile:
dest: "/etc/default/libvirt-bin"
line: 'libvirtd_opts="{% if ansible_service_mgr != "systemd" %}-d{% endif%}"'
regexp: "^libvirtd_opts="
backup: "yes"
when:
- nova_libvirtd_listen_tcp == 0
- ansible_pkg_mgr == 'apt'
notify: Restart libvirt-bin
tags:
- nova-kvm
- nova-libvirt
- name: Set libvirt runtime options (CentOS)
lineinfile:
dest: "/etc/sysconfig/libvirtd"

View File

@ -17,7 +17,6 @@
service:
name: "{{ libvirt_service_name }}"
state: "started"
pattern: "{{ libvirt_service_name }}"
- name: Check the state of the default qemu save directory
stat:

View File

@ -34,14 +34,3 @@
- smt_disable_result.rc == 0
notify:
- Reload systemd daemon
- name: Upstart script to disable SMT
copy:
src: "smt.conf"
dest: "/etc/init/smt.conf"
when:
- ansible_service_mgr != 'systemd'
- smt_disable_result.rc is defined
- smt_disable_result.rc == 0
notify:
- Reload upstart init scripts

View File

@ -13,10 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- include: nova_init_upstart.yml
when:
- ansible_service_mgr == 'upstart'
- include: nova_init_systemd.yml
when:
- ansible_service_mgr == 'systemd'

View File

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

View File

@ -1,44 +0,0 @@
# {{ ansible_managed }}
description "{{ item.value.service_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="{{ nova_bin }}/{{ item.value.service_name }}"
# Change directory to service users home
chdir "{{ nova_system_home_folder }}"
# Pre start actions
pre-start script
mkdir -p "/var/run/{{ item.value.service_name }}"
chown {{ nova_system_user_name }}:{{ nova_system_group_name }} "/var/run/{{ item.value.service_name }}"
mkdir -p "/var/lock/{{ item.value.service_name }}"
chown {{ nova_system_user_name }}:{{ nova_system_group_name }} "/var/lock/{{ item.value.service_name }}"
. {{ nova_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 {{ nova_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/{{ nova_service_name }}/{{ item.value.service_name }}.log

View File

@ -1,103 +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.
## APT Cache options
cache_timeout: 600
libvirt_group: libvirtd
libvirt_service_name: libvirt-bin
# Common apt packages
nova_distro_packages:
- genisoimage
- git
- libpq-dev
- iptables
# Spice console apt packages
nova_spice_distro_packages:
- spice-html5
nova_novnc_distro_packages:
- libjs-jquery
- libjs-sphinxdoc
- libjs-underscore
- libjs-swfobject
- librabbitmq1
- libyaml-0-2
nova_compute_kvm_distro_packages:
- bridge-utils
- genisoimage
- kpartx
- libvirt-bin
- open-iscsi
- python-libguestfs
- python-libvirt
- qemu
- qemu-utils
- sysfsutils
- vlan
- nfs-common
- dosfstools
- dosfstools-dbg
- multipath-tools
nova_compute_lxd_distro_packages:
- bridge-utils
- dosfstools
- dosfstools-dbg
- genisoimage
- kpartx
- lxd
- multipath-tools
- nfs-common
- open-iscsi
- python-libguestfs
- sysfsutils
- vlan
# Ubuntu Cloud Archive variables
# There are no UCA packages for Trusty beyond Mitaka, so the selected
# release here has to remain at Mitaka.
uca_openstack_release: mitaka
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"
# nova powervm virt driver
nova_compute_powervm_distro_packages:
- bridge-utils
- genisoimage
- kpartx
- open-iscsi
- python-libguestfs
- sysfsutils
- vlan
- nfs-common
- dosfstools
- dosfstools-dbg
- multipath-tools
- pvm-novalink
novalink_repo:
repo: "deb [arch=ppc64el] http://public.dhe.ibm.com/systems/virtualization/Novalink/debian/ novalink_1.0.0 non-free"
state: "present"
novalink_gpg_keys:
- url: "http://public.dhe.ibm.com/systems/virtualization/Novalink/debian/novalink-gpg-pub.key"
state: "present"
#lxd-specific variables
lxd_default_release: "trusty-backports"