mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
api: Fix registering of s3 endpoint peers properly (#4159)
We need to have local peer initialized properly
for listen bucket to work, current code did initialize
properly but the resulting code was initializing
peer on a wrong target v/s what listen bucket expected
it to be.
This regression came in de204a0a52
Fixes #4158
This commit is contained in:
@@ -19,7 +19,6 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
|
||||||
"path"
|
"path"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
@@ -42,12 +41,8 @@ type s3Peers []s3Peer
|
|||||||
// slice. The urls slice is assumed to be non-empty and free of nil
|
// slice. The urls slice is assumed to be non-empty and free of nil
|
||||||
// values.
|
// values.
|
||||||
func makeS3Peers(endpoints EndpointList) (s3PeerList s3Peers) {
|
func makeS3Peers(endpoints EndpointList) (s3PeerList s3Peers) {
|
||||||
thisPeer := globalMinioAddr
|
|
||||||
if globalMinioHost == "" {
|
|
||||||
thisPeer = net.JoinHostPort("localhost", globalMinioPort)
|
|
||||||
}
|
|
||||||
s3PeerList = append(s3PeerList, s3Peer{
|
s3PeerList = append(s3PeerList, s3Peer{
|
||||||
thisPeer,
|
globalMinioAddr,
|
||||||
&localBucketMetaState{ObjectAPI: newObjectLayerFn},
|
&localBucketMetaState{ObjectAPI: newObjectLayerFn},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user