Handle localhost distributed setups properly (#8577)

Fixes an issue reported by @klauspost and @vadmeste

This PR also allows users to expand their clusters
from single node XL deployment to distributed mode.
This commit is contained in:
Harshavardhana
2019-11-26 11:42:10 -08:00
committed by GitHub
parent 78eb3b78bb
commit 5d65428b29
16 changed files with 189 additions and 187 deletions

View File

@@ -742,9 +742,9 @@ func (sys *NotificationSys) initListeners(ctx context.Context, objAPI ObjectLaye
}
for _, args := range listenerList {
found, err := isLocalHost(args.Addr.Name)
found, err := isLocalHost(args.Addr.Name, args.Addr.Port.String(), args.Addr.Port.String())
if err != nil {
logger.GetReqInfo(ctx).AppendTags("host", args.Addr.Name)
logger.GetReqInfo(ctx).AppendTags("host", args.Addr.String())
logger.LogIf(ctx, err)
return err
}