Old reverse DNS lookups are sometimes not cleared properly
This ticket is based on a report by the t6kexit1 operator on the metrics-team@ mailing list.
Relay t6kexit1 recently switched from IP address 22.214.171.124 to 126.96.36.199. While Onionoo was able to resolve the previous IP address to a host name, it fails to resolve the current IP address. This failure may or may not be an Onionoo bug, but let's ignore this possible bug for the moment.
The fact that Onionoo sticks to the previous host name, even after the relay changed its IP address, is for sure a bug. Let's focus on this one, because it may be harder to reproduce this situation at a later time.
I looked at the relevant code. It seems like Onionoo only considers successful reverse DNS lookups, but disregards failed lookup attempts. What it should do instead is clear previous results in case of a failed lookup attempt.
I'll work on a patch, test it, and then post it here for review.