mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
Fix healthcheck script to wait for netstat command output (#7275)
Fixes #7272
This commit is contained in:
committed by
Harshavardhana
parent
7923b83953
commit
dab314900d
@@ -83,6 +83,11 @@ func findEndpoint() string {
|
|||||||
if strings.Count(addr, ":") > 0 {
|
if strings.Count(addr, ":") > 0 {
|
||||||
addr = strings.Join([]string{"[", addr, "]"}, "")
|
addr = strings.Join([]string{"[", addr, "]"}, "")
|
||||||
}
|
}
|
||||||
|
// wait for cmd to complete before return
|
||||||
|
if err = cmd.Wait(); err != nil {
|
||||||
|
// command failed to run
|
||||||
|
log.Fatal(err.Error())
|
||||||
|
}
|
||||||
// return joint address and port
|
// return joint address and port
|
||||||
return strings.Join([]string{addr, port}, ":")
|
return strings.Join([]string{addr, port}, ":")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user