Add validation task in docker services [Ovn]

Docker services are missing the pre-upgrade validation task
in the upgrade_tasks section which verifies if the service
is running before going on with the upgrade.

Change-Id: I11ef35d69ff100002d9558dc475a014ed7508a7c
Partial-Bug: #1704389
This commit is contained in:
Jose Luis Franco Arza 2017-09-08 09:06:56 +02:00
parent 9bd858ebdf
commit 2f5a74aa2b
2 changed files with 20 additions and 0 deletions

@ -102,6 +102,16 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
upgrade_tasks:
- name: Check if ovn_controller is deployed
command: systemctl is-enabled --quiet ovn-controller
tags: common
ignore_errors: True
register: ovn_controller_enabled
- name: "PreUpgrade step0,validation: Check service ovn_controller is running"
command: systemctl is-active --quiet ovn-controller
when: ovn_controller_enabled.rc == 0
tags: step0,validation
- name: Stop and disable ovn-controller service
tags: step2
when: ovn_controller_enabled.rc == 0
service: name=ovn-controller state=stopped enabled=no

@ -199,6 +199,16 @@ outputs:
- /var/log/containers/openvswitch
- /var/lib/openvswitch/ovn
upgrade_tasks:
- name: Check if ovn_northd is deployed
command: systemctl is-enabled --quiet ovn-northd
tags: common
ignore_errors: True
register: ovn_northd_enabled
- name: "PreUpgrade step0,validation: Check service ovn_northd is running"
command: systemctl is-active --quiet ovn-northd
when: ovn_northd_enabled.rc == 0
tags: step0,validation
- name: Stop and disable ovn-northd service
tags: step2
when: ovn_northd_enabled.rc == 0
service: name=ovn-northd state=stopped enabled=no