Avoid race condition with hostname declaration

When we remove nodes from Cobbler, we lose access to this
node using hostnames.

Change-Id: Ic52cbd7562db91b9ea01fab30c56054c5253a93b
Related-Bug: #1316583
Merge "Avoid race condition with hostname declaration"