Merge "Check to make sure compute service is deployed before scale down" into stable/train

This commit is contained in:
Zuul 2020-01-30 07:40:11 +00:00 committed by Gerrit Code Review
commit a8eb06cecc
1 changed files with 25 additions and 24 deletions

View File

@ -1109,31 +1109,32 @@ outputs:
-> {{ nova_compute_service }}.
when:
- (nova_compute_service | length) > 1
- name: Disable nova-compute service
command: openstack compute service set {{ nova_compute_service[0].Host }} nova-compute --disable
delegate_to: localhost
check_mode: no
- name: Disable nova services
when:
- (nova_compute_service | length) <= 1
- not is_additional_cell|bool
- name: Stop nova-compute healthcheck container
service:
name: tripleo_nova_compute_healthcheck
state: stopped
enabled: no
become: true
- name: Stop nova-compute container
service:
name: tripleo_nova_compute
state: stopped
enabled: no
become: true
- name: Delete nova-compute service
command: openstack compute service delete {{ nova_compute_service[0].ID }}
delegate_to: localhost
check_mode: no
when:
- (nova_compute_service | length) <= 1
- (nova_compute_service | length) == 1
block:
- name: Disable nova-compute service
command: openstack compute service set {{ nova_compute_service[0].Host }} nova-compute --disable
delegate_to: localhost
check_mode: no
when:
- not is_additional_cell|bool
- name: Stop nova-compute healthcheck container
service:
name: tripleo_nova_compute_healthcheck
state: stopped
enabled: no
become: true
- name: Stop nova-compute container
service:
name: tripleo_nova_compute
state: stopped
enabled: no
become: true
- name: Delete nova-compute service
command: openstack compute service delete {{ nova_compute_service[0].ID }}
delegate_to: localhost
check_mode: no
fast_forward_upgrade_tasks:
- when:
- step|int == 0