Merge remote-tracking branch 'starlingx/master' into HEAD

Change-Id: I0b83aa56063c84774e6ea2353ebc819ecb126a4a
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2019-02-15 12:16:39 -05:00
commit 8a6fd563ed
1 changed files with 13 additions and 1 deletions

View File

@ -119,6 +119,18 @@ def delete_node(node_name):
# Delete the node
body = kubernetes.client.V1DeleteOptions()
response = kube_client.delete_node(node_name, body)
try:
response = kube_client.delete_node(node_name, body)
except ApiException as e:
if e.status == httplib.NOT_FOUND:
# In some cases we may attempt to delete a node that exists in
# the VIM, but not yet in kubernetes (e.g. when the node is first
# being configured). Ignore the failure.
DLOG.info("Not deleting node %s because it doesn't exist" %
node_name)
return
else:
raise
return Result(response)