Handle exception in agent when node was removed and rediscovered

Change-Id: Icb9bb4282d00b83de44477f9063292a76c444c4c
Closes-Bug: #1349815
This commit is contained in:
Kamil Sambor 2014-07-29 14:40:35 +02:00
parent 3a991ff79d
commit 8cf375f768
1 changed files with 4 additions and 0 deletions

View File

@ -563,6 +563,10 @@ begin
end
else
resp = agent.put
# Handle case when node was removed, but nailgun_uid exist
if resp.status == 400
resp = agent.post
end
end
unless [201, 200].include? resp.status
logger.error resp.body