Fix the issue that could not detach lbaas policy

Should set ignore_missing True when delete loadbalancer, or openstacksdk
will raise NotFound exception, it will make the detach action fail.

Change-Id: Ic7682c747397e2ce3a496be4de428b5b8427222d
Closes-Bug: #1712516
This commit is contained in:
lvdongbing 2017-08-23 17:30:09 +08:00
parent f537e47efc
commit f2c7368305
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ class LoadBalancerDriver(base.DriverBase):
waited = 0
while waited < self.lb_status_timeout:
try:
lb = self.nc().loadbalancer_get(lb_id)
lb = self.nc().loadbalancer_get(lb_id, ignore_missing=True)
except exception.InternalError as ex:
msg = ('Failed in getting loadbalancer: %s.'
% six.text_type(ex))