Service nodes: periodically check connection to self on public IP
jagerman opened this issue · 0 comments
People sometimes run into an issue (particularly after moving hosts) where they have forgotten to update the service-node-public-ip setting in the config file. This causes problems, of course, because that means storage server and quorumnet will be unreachable.
We can, in most cases, check that and at least print some log warnings that might help the admin out by doing a couple things:
-
We can run a periodic timer (say every 15 minutes) that attempts to establish an OMQ connection to our configured public ip to hit the
ping.ping
endpoint and see if we get a response. If we don't, we MERROR a log message. This can produce false positives because, in some slightly exotic network setups, the public IP might not be reachable from inside a private network, but external requests will get forwarded to the right place. -
We can check that the public ip matches one of the system's public IPs, and warn if it doesn't. This will hit false positives on some hosts because there are hosts where a VPS is allocated a private IP and requests are forwarded to that private IP from a floating public IP. We could perhaps fix that by using logic such as:
- if we get a list of the host's IPs, and it contains public IPs, and our configured public ip isn't on the list, produce the MERROR warning.
Because of the false positive potential, this should be something we can disable with an option for oxen.conf such as disable-ip-check=1
.