mirror of
https://github.com/minio/minio.git
synced 2025-01-25 13:43:17 -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) {
|
func makeAdminPeers(endpoints EndpointList) (adminPeerList adminPeers) {
|
||||||
thisPeer := globalMinioAddr
|
thisPeer := globalMinioAddr
|
||||||
if globalMinioHost == "" {
|
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{
|
adminPeerList = append(adminPeerList, adminPeer{
|
||||||
thisPeer,
|
thisPeer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user