nova_status¶
Role Documentation¶
Welcome to the “nova_status” role documentation.
Role Variables: main.yml¶
metadata:
name: Nova Status Upgrade Check
description: >
Performs a release-specific readiness check before restarting services with
new code. This command expects to have complete configuration and access to
databases and services within a cell. For example, this check may query the
Nova API database and one or more cell databases. It may also make requests
to other services such as the Placement REST API via the Keystone service
catalog
The nova-status upgrade check command has three standard return codes:
0 -> All upgrade readiness checks passed successfully and there is nothing to
do.
1 -> At least one check encountered an issue and requires further investigation.
This is considered a warning but the upgrade may be OK.
2 -> There was an upgrade status check failure that needs to be investigated.
This should be considered something that stops an upgrade.
groups:
- pre-upgrade
Molecule Scenarios¶
Molecule is being used to test the “nova_status” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.
- Driver: podman
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
Example default playbook¶
- name: Converge
hosts: all
gather_facts: false
tasks:
- name: working detection
include_role:
name: nova_status
- name: make validation fail
block:
- name: run validation
include_role:
name: nova_status
vars:
container_cli: docker
rescue:
- name: Clear host errors
meta: clear_host_errors
- name: Test output
debug:
msg: The validation works! End play
- name: End play
meta: end_play
- name: Fail playbook if reached
fail:
msg: |
The nova_status validation didn't properly detect bad upgrade
status check!