Gracefully exit if hostname is not resolvable from various contrail daemons

Change-Id: Id77d3e3b10be7640c395a4a213278f6c2c53d5c4