[No Reviewer] Allow hostnames as well as IP addresses

Merging to clearwater branch (already in master)