However, the current implementation assumes that a DNS resolution failure is indicated by zookeeper_init() returning NULL and errno being set to EINVAL (Zk translates getaddrinfo() failures into errno values). However, the current Zk code does:
getaddrinfo() returns EAI_NONAME when "the node or service is not known"; per discussion in
MESOS-2186, this seems to happen intermittently due to DNS failures.
Proposed fix: looking at errno is always going to be somewhat fragile, but if we're going to continue doing that, we should check for ENOENT as well as EINVAL.