Addressed comments: thanks!
@@ -167,14 +167,13 @@ module TaskQueue
Djinn.log_debug('Waiting for RabbitMQ on master node to come up')
HelperFunctions.sleep_until_port_is_open(master_ip, SERVER_PORT)
- # We need not to contact the master node, and we need to use its name
- # (just the hostname not the fqdn). To resolve it we use
- # Addrinfo.getnameingo since Resolv will not use /etc/hosts and this
- # could cause issues on private clusters.
+ # Look up the TaskQueue master's hostname (not the fqdn). To resolve
+ # it we use Addrinfo.getnameinfo since Resolv will not use /etc/hosts
+ # and this could cause issues on private clusters.
master_tq_host = nil
begin
master_tq_host = Addrinfo.ip(master_ip).getnameinfo[0]
- if (master_tq_host =~ /[[:digit:]]/).nil?
+ unless (master_tq_host =~ /^[[:digit:]]/).nil?
Djinn.log_warn("#{master_ip} didn't resolve to a hostname! Expect" \
" problems with rabbitmq clustering.")
else
