Check to make sure compute service is deployed before scale down
Currently during a node scale down using openstack overcloud
node delete, we assume the that nova-compute is enabled on the
node and is working as expected. However, the node scale down
fails in cases where the node being scaled is not correctly
behaving as a compute node (nova containers not running/reporting
to the overcloud). This patch includes a check to only disable
and stop nova services if they are running. We ran into this
scenario when we wanted to scale down a node that did not cleanly
deploy as a compute node due to failure in step 5 in a large scale
environment.
Change-Id: Ic8225af65c409b6a32d4bb2def370c7c802147fa
Co-Authored-By: Luke Short <ekultails@gmail.com>
Closes-Bug: #1860694
Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
(cherry picked from commit 119769384f
)
This commit is contained in:
parent
ac253147e9
commit
557c0c358f
|
@ -1101,31 +1101,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
|
||||
|
|
Loading…
Reference in New Issue