From 3abb8c8ed71e54755830163acf8952886fcad7b0 Mon Sep 17 00:00:00 2001 From: Stefan Benten Date: Tue, 28 Jan 2020 15:25:17 +0100 Subject: [PATCH] Dont require an IP address being set Per default our server address is listening on all IP addresses on the machine. This caused our preflight check to fail, as it did not have an hostname to lookup. With this change, we are fine with this and go ahead. Change-Id: I9eb5c891c099eb35f679d6d7e79ec38bb43b619f --- storagenode/peer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storagenode/peer.go b/storagenode/peer.go index 282fb24f8..d41572a3c 100644 --- a/storagenode/peer.go +++ b/storagenode/peer.go @@ -133,7 +133,9 @@ func isAddressValid(addrstring string) error { if err != nil || port == "" { return errs.New("split host-port %q failed: %+v", addrstring, err) } - + if addr == "" { + return nil + } resolvedhosts, err := net.LookupHost(addr) if err != nil || len(resolvedhosts) == 0 { return errs.New("lookup %q failed: %+v", addr, err)