overcloud_service_status¶
Role Documentation¶
Welcome to the “overcloud_service_status” role documentation.
Role Defaults¶
This section highlights all of the defaults and variables set within the “overcloud_service_status” role.
# All variables intended for modification should place placed in this file.
# All variables within this role should have a prefix of "overcloud_service_status"
overcloud_service_status_debug: false
overcloud_service_api:
- nova
- cinderv3
overcloud_deprecated_services:
nova:
- nova-consoleauth
Role Variables: main.yml¶
# While options found within the vars/ path can be overridden using extra
# vars, items within this path are considered part of the role and not
# intended to be modified.
metadata:
name: Verify overcloud services state after running a deployment or an update
description: >
An Ansible role to verify the Overcloud services states after a deployment
or an update. It checks the API /os-services and looks for deprecated
services (nova-consoleauth) or any down services.
groups:
- post-deployment
- post-upgrade
- post-overcloud-upgrade
- post-overcloud-converge
- post-update
- pre-update
Molecule Scenarios¶
Molecule is being used to test the “overcloud_service_status” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.
- Driver: podman:
- Driver: podman:
- Driver: podman:
Scenario: deprecated_services¶
Molecule Platform(s)¶
- name: centos
hostname: centos
image: centos/centos:stream8
registry:
url: quay.io
dockerfile: ../../../../.config/molecule/Dockerfile
pkg_extras: python*-setuptools python*-pyyaml
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
privileged: true
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits:
- host
Molecule Inventory¶
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
overcloud_keystone_url: http://127.0.0.1:8080
overcloud_admin_password: hello
Example deprecated_services playbook¶
- name: Converge
hosts: all
tasks:
- block:
- name: Include overcloud_service_status role
include_role:
name: overcloud_service_status
rescue:
- fail:
msg: Default test failed
when: molecule_yml.scenario.name == "default"
- set_fact:
output_var: "{{ lookup('vars', molecule_yml.scenario.name + '_output')}}"
- fail:
msg: No {{ molecule_yml.scenario.name }} found
when: "'failed' not in output_var"
Scenario: default¶
Molecule Platform(s)¶
- name: centos
hostname: centos
image: centos/centos:stream8
registry:
url: quay.io
dockerfile: ../../../../.config/molecule/Dockerfile
pkg_extras: python*-setuptools python*-pyyaml
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
privileged: true
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits:
- host
Molecule Inventory¶
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
overcloud_keystone_url: http://127.0.0.1:8080
overcloud_admin_password: hello
Example default playbook¶
- name: Converge
hosts: all
tasks:
- block:
- name: Include overcloud_service_status role
include_role:
name: overcloud_service_status
rescue:
- fail:
msg: Default test failed
when: molecule_yml.scenario.name == "default"
- set_fact:
output_var: "{{ lookup('vars', molecule_yml.scenario.name + '_output')}}"
- fail:
msg: No {{ molecule_yml.scenario.name }} found
when: "'failed' not in output_var"
Scenario: down_services¶
Molecule Platform(s)¶
- name: centos
hostname: centos
image: centos/centos:stream8
registry:
url: quay.io
dockerfile: ../../../../.config/molecule/Dockerfile
pkg_extras: python*-setuptools python*-pyyaml
volumes:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
privileged: true
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits:
- host
Molecule Inventory¶
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
overcloud_keystone_url: http://127.0.0.1:8080
overcloud_admin_password: hello
Example down_services playbook¶
- name: Converge
hosts: all
tasks:
- block:
- name: Include overcloud_service_status role
include_role:
name: overcloud_service_status
rescue:
- fail:
msg: Default test failed
when: molecule_yml.scenario.name == "default"
- set_fact:
output_var: "{{ lookup('vars', molecule_yml.scenario.name + '_output')}}"
- fail:
msg: No {{ molecule_yml.scenario.name }} found
when: "'failed' not in output_var"