Fixed /etc/hosts update for external hdfs

Before the change /etc/hosts were growing infinitely

Change-Id: I303c013fc0fa85f1826aa60106846a3b7b214be3
Closes-Bug: #1326114
Merge "Fixed /etc/hosts update for external hdfs"