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