From 2f4e1214becc2ad84261708d16eed2bb46a11759 Mon Sep 17 00:00:00 2001 From: georgeee Date: Wed, 18 Oct 2023 17:13:32 +0200 Subject: [PATCH] Support remote_addr without port in Orchestrator --- src/app/itn_orchestrator/src/discovery.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/itn_orchestrator/src/discovery.go b/src/app/itn_orchestrator/src/discovery.go index 03f6c0fd83b..a4016b50c86 100644 --- a/src/app/itn_orchestrator/src/discovery.go +++ b/src/app/itn_orchestrator/src/discovery.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "errors" - "fmt" "strconv" "strings" "time" @@ -76,7 +75,8 @@ func discoverParticipantsDo(config Config, params DiscoveryParams, output func(N } colonIx := strings.IndexRune(meta.RemoteAddr, ':') if colonIx < 0 { - return fmt.Errorf("wrong remote address in submission %s: %s", name, meta.RemoteAddr) + // No port is specified in the address, hence we just take the whole remote address field + colonIx = len(meta.RemoteAddr) } addr := NodeAddress(meta.RemoteAddr[:colonIx] + ":" + strconv.Itoa(int(meta.GraphqlControlPort))) if _, has := cache[addr]; has {