pre-upgrade-stop.yaml

Overview

This YAML file defines a set of Ansible tasks that coordinate the graceful shutdown of various services and nodes prior to performing an upgrade. It is specifically focused on stopping Docker Compose-managed containers and Aerospike database services in a controlled manner. The file ensures that the shutdown process respects the upgrade context, executing only the relevant steps for the components involved in the upgrade.

Tasks and Their Functionality

1. Node graceful shutdown step 1

2. Node graceful shutdown step 2 (for compose upgrade)

3. Aerospike shutdown for upgrade

Important Implementation Details

Interaction with Other System Components


Mermaid Diagram

flowchart TD
A[Start Pre-Upgrade Stop] --> B[Include graceful-shutdown.yaml]
B --> C{Is 'compose' in UPGRADE and compose.changed?}
C -- Yes --> D[Run: docker compose down node{{NODE_ID}}]
C -- No --> E
D --> E{Is 'aerospike' in UPGRADE and aerospike.changed?}
E -- Yes --> F[Run: docker compose stop aerospike]
E -- No --> G[End]
F --> G

This diagram illustrates the flow of tasks in pre-upgrade-stop.yaml, showing conditional execution paths for node and Aerospike container shutdowns.