aphyr/jepsen — pull request #14 by colin-scott (2014-03-26 18:44:46+00:00)
Title: Use getent rather than dig.

I saw the following remote error message when Jepsen tried to partition the
cluster:

'DROP' unknown argument, see iptables -h for usage.

The command being executed was:

"sudo -S -u root bash -c "cd /; iptables -A INPUT -s -j DROP"

The problem here was that the argument to -s was nil.

I dug a bit deeper and found that the dig command (used in
jepsen.control.net/ip) does not search /etc/hosts:

http://superuser.com/questions/305939/bash-lookup-an-ip-for-a-host-name-including-etc-hosts-in-search

This commit uses getent instead of dig, which searches looks up hosts by both
/etc/hosts and DNS. I verified that this correctly returns non-nil results.

This is my first time using Clojure; please feel free to comment on style problems.