Fix floating IP logic in destroy
There's a logic bug in the destroy action: ip_flag is assuming string context when it should be assuming list context. This causes ip_flag to never get set to true and therefore floating IP's never get destroyed. This can lead to floating IP exhaustion, particularly in environments with a low number of allocatable floating IP's. This patch corrects the problem by fixing the logic to check for a list length of zero rather than an empty string. Change-Id: I0205ac406e604365560360fc2953a5e90e1c9be3 Depends-On: Ifa9eeb9d761d9801cab580445e6c43c8cf1dfdaa
This commit is contained in:
parent
f455064066
commit
36900e12cd
@ -2,7 +2,7 @@
|
||||
|
||||
- name: Setup release floating IP flag
|
||||
set_fact:
|
||||
ip_flag: "{{ app_env.app_setting.ips[inventory_hostname] == '' }}"
|
||||
ip_flag: "{{ app_env.app_setting.ips[inventory_hostname]|length == 0 }}"
|
||||
|
||||
- name: Destroy the OpenStack VM
|
||||
os_server:
|
||||
|
Loading…
x
Reference in New Issue
Block a user