Merge "Add aodh-api init removal upgrade docs and script"

This commit is contained in:
Jenkins 2016-08-21 00:04:47 +00:00 committed by Gerrit Code Review
commit 35fbce572d
4 changed files with 68 additions and 0 deletions

View File

@ -206,6 +206,15 @@ See :ref:`memcached-flush` for details.
# openstack-ansible "${UPGRADE_PLAYBOOKS}/memcached-flush.yml"
Stop and remove ``aodh-api`` service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See :ref:`aodh-api-init-delete` for details.
.. code-block:: console
# openstack-ansible "${UPGRADE_PLAYBOOKS}/aodh-api-init-delete.yml"
Upgrade OpenStack
~~~~~~~~~~~~~~~~~

View File

@ -112,6 +112,17 @@ current version of MariaDB and Galera and upgrade to the 10.x series.
Sends "flush_all" to memcached with the help of nc.
.. _aodh-api-init-delete:
``aodh-api-init-delete.yml``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stops the ``aodh-api`` service and removes the init file since ``aodh-api``
now runs under Apache ``mod_wsgi``.
Run the ``os-aodh-install.yml`` playbook during the OpenStack services upgrade
to ensure ``aodh-api`` is available after running ``aodh-api-init-delete.yml``.
--------------
.. include:: navigation.txt

View File

@ -170,6 +170,7 @@ function main {
RUN_TASKS+=("utility-install.yml")
RUN_TASKS+=("rsyslog-install.yml")
RUN_TASKS+=("${UPGRADE_PLAYBOOKS}/memcached-flush.yml")
RUN_TASKS+=("${UPGRADE_PLAYBOOKS}/aodh-api-init-delete.yml")
RUN_TASKS+=("setup-openstack.yml")
# Run the tasks in order
for item in ${!RUN_TASKS[@]}; do

View File

@ -0,0 +1,47 @@
---
# Copyright 2016, Logan Vig <logan2211@gmail.com>
#
# 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: Delete aodh-api init file
hosts: aodh_all
gather_facts: false
user: root
pre_tasks:
- name: Check init system
command: cat /proc/1/comm
register: _pid1_name
- name: Set the name of pid1
set_fact:
pid1_name: "{{ _pid1_name.stdout }}"
tasks:
- name: Stop the aodh-api service
service:
name: aodh-api
state: stopped
enabled: no
- name: Remove the aodh-api upstart init file
file:
path: '/etc/init/aodh-api.conf'
state: absent
when: pid1_name == "init"
- name: Reload upstart init scripts
command: initctl reload-configuration
when: pid1_name == "init"
- name: Remove the aodh-api systemd init file
file:
path: '/etc/systemd/system/aodh-api.service'
when: pid1_name == "systemd"
- name: Reload systemd
command: systemctl daemon-reload
when: pid1_name == "systemd"