Run restart playbooks to test they work

This runs our zuul and nodepool restart playbooks after the initial
service installs in the system-config-run jobs. This will help ensure
that they work consistently over time.

Fix nodepool restart playbook

Change-Id: I953e7222218c5555bb44fccd913eaa5e9374c669
This commit is contained in:
Monty Taylor 2020-06-16 12:02:11 -05:00
parent 4918594aa4
commit 9b28b8864a
2 changed files with 41 additions and 24 deletions

View File

@ -1,6 +1,6 @@
# Run this with "-f 20"
- hosts: 'nodepool-builder:!disabled'
- hosts: 'nb03.openstack.orgr:!disabled'
any_errors_fatal: true
tasks:
- name: Stop Nodepool Builder
@ -10,17 +10,27 @@
become: true
become_user: root
- hosts: 'nodepool-builder_opendev:!disabled'
any_errors_fatal: true
tasks:
- name: Stop Nodepool builder
shell:
cmd: docker-compose down
chdir: /etc/nodepool-builder-compose
become: true
become_user: root
- hosts: 'nodepool-launcher:!disabled'
any_errors_fatal: true
tasks:
- name: Stop Nodepool Launcher
service:
name: nodepool-launcher
state: stopped
shell:
cmd: docker-compose down
chdir: /etc/nodepool-docker/
become: true
become_user: root
- hosts: 'nodepool-builder:!disabled'
- hosts: 'nb03.openstack.org:!disabled'
any_errors_fatal: true
tasks:
- name: Wait for (3h10m) to stop Nodepool Builder
@ -29,25 +39,7 @@
state: absent
timeout: 11400
- hosts: 'nodepool-launcher:!disabled'
any_errors_fatal: true
tasks:
- name: Wait for (3h10m) to stop Nodepool Launcher
wait_for:
path: /var/run/nodepool-launcher/nodepool-launcher.pid
state: absent
timeout: 11400
- hosts: 'nodepool-launcher:!disabled'
tasks:
- name: Start Nodepool Launcher
service:
name: nodepool-launcher
state: started
become: true
become_user: root
- hosts: 'nodepool-builder:!disabled'
- hosts: 'nb03.openstack.org:!disabled'
tasks:
- name: Start Nodepool Builder
service:
@ -55,3 +47,22 @@
state: started
become: true
become_user: root
- hosts: 'nodepool-builder_opendev:!disabled'
tasks:
- name: Start Nodepool Builder
shell:
cmd: docker-compose up -d
chdir: /etc/nodepool-builder-compose
become: true
become_user: root
- hosts: 'nodepool-launcher:!disabled'
any_errors_fatal: true
tasks:
- name: Start Nodepool Launcher
shell:
cmd: docker-compose up -d
chdir: /etc/nodepool-docker/
become: true
become_user: root

View File

@ -266,6 +266,8 @@
- playbooks/service-zookeeper.yaml
- playbooks/service-nodepool.yaml
- playbooks/remote_puppet_else.yaml
# Test our ad hoc restart playbook works
- playbooks/nodepool_restart.yaml
files:
- playbooks/install-ansible.yaml
- inventory/service/group_vars/nodepool.yaml
@ -277,6 +279,7 @@
- playbooks/roles/configure-openstacksdk/
- playbooks/roles/nodepool
- playbooks/templates/clouds/
- playbooks/nodepool_restart.yaml
- testinfra/test_nodepool.py
- job:
@ -645,6 +648,8 @@
- playbooks/letsencrypt.yaml
- playbooks/service-zookeeper.yaml
- playbooks/service-zuul.yaml
# Test our ad hoc restart playbook works
- playbooks/zuul_restart.yaml
host-vars:
zm01.openstack.org:
host_copy_output:
@ -684,6 +689,7 @@
- playbooks/zuul/templates/group_vars/zookeeper.yaml
- playbooks/zuul/templates/host_vars/zk\d+
- playbooks/zuul/templates/host_vars/zuul01.openstack.org
- playbooks/zuul_restart.yaml
- testinfra/test_zuul_executor.py
- testinfra/test_zuul_scheduler.py
- testinfra/test_zuul_merger.py