mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix admin info peer to point to first endpoint (#5996)
The current problem is that when you invoke ``` mc admin info myminio | head -1 ● localhost:9000 ``` This output is incorrect as the expected output should be ``` mc admin info myminio | head -1 ● 192.168.1.17:9000 ```
This commit is contained in:
parent
9fb94e6aa8
commit
487ecedc51
@ -256,7 +256,9 @@ type adminPeers []adminPeer
|
||||
func makeAdminPeers(endpoints EndpointList) (adminPeerList adminPeers) {
|
||||
thisPeer := globalMinioAddr
|
||||
if globalMinioHost == "" {
|
||||
thisPeer = net.JoinHostPort("localhost", globalMinioPort)
|
||||
// When host is not explicitly provided simply
|
||||
// use the first IPv4.
|
||||
thisPeer = net.JoinHostPort(sortIPs(localIP4.ToSlice())[0], globalMinioPort)
|
||||
}
|
||||
adminPeerList = append(adminPeerList, adminPeer{
|
||||
thisPeer,
|
||||
|
Loading…
Reference in New Issue
Block a user