Add aodh-api init removal upgrade docs and script
Please see I19e5f4e4b354edf6f4f5e51e9b9066a284a3e7ef Depends-On: I19e5f4e4b354edf6f4f5e51e9b9066a284a3e7ef Change-Id: I65cfe7335ebce52bfb668dbf7c605f0f323b0663
This commit is contained in:
parent
813be4f33f
commit
89f088ea86
@ -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
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -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
|
||||
|
@ -164,6 +164,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
|
||||
|
47
scripts/upgrade-utilities/playbooks/aodh-api-init-delete.yml
Normal file
47
scripts/upgrade-utilities/playbooks/aodh-api-init-delete.yml
Normal 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"
|
Loading…
Reference in New Issue
Block a user