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
(cherry picked from commit 1829a9adbe69cc1b50403929a737cadbcbbba0ec)