Interesting EC2 DNS bug
EC2's internal DNS servers don't get updates when you stop and restart EBS-backed instances.
I came across this bug as I was trying to get the scala off-line compiler to work on a restarted instance.
fsc uses java.net.InetAddress.getLocalhost(), which triggers a DNS call. After some time spent reading the code, a tcpdump session convinced me that the machine thought it was something else (at least at the DNS level). Call it split personality.
To reproduce:
- start an EBS-backed instance
- note its name and its internal ip (uname -n, ip addr)
- stop and restart the instance
- its node name remains unchanged, its ip has changed, yet
dig +short instance_dns_namereturns the old IP, even hours after the restart