From ff94b1b0a91008c3707692af87511e6604566583 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 11 Jun 2020 08:05:25 -0700 Subject: [PATCH] isEndpointConnected should take local disk inputs (#9803) PR #9801 while it is correct, the loop isEndpointConnected() was changed to rely on endpoint.String() which has the host information as well, which is not correct value as input to detect if the disk is down or up, if endpoint is local use its local path value instead. --- cmd/xl-sets.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/xl-sets.go b/cmd/xl-sets.go index eb1afa348..f06f5b27c 100644 --- a/cmd/xl-sets.go +++ b/cmd/xl-sets.go @@ -190,7 +190,11 @@ func (s *xlSets) connectDisks() { var wg sync.WaitGroup diskMap := s.getDiskMap() for _, endpoint := range s.endpoints { - if isEndpointConnected(diskMap, endpoint.String()) { + diskPath := endpoint.String() + if endpoint.IsLocal { + diskPath = endpoint.Path + } + if isEndpointConnected(diskMap, diskPath) { continue } wg.Add(1)