From 8cf375f7687d7d0797e7f085a909df8087fc82a6 Mon Sep 17 00:00:00 2001 From: Kamil Sambor Date: Tue, 29 Jul 2014 14:40:35 +0200 Subject: [PATCH] Handle exception in agent when node was removed and rediscovered Change-Id: Icb9bb4282d00b83de44477f9063292a76c444c4c Closes-Bug: #1349815 --- bin/agent | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/agent b/bin/agent index 4d12a73d1a..64e63d7935 100755 --- a/bin/agent +++ b/bin/agent @@ -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