mirror of
https://github.com/minio/minio.git
synced 2025-04-27 13:24:52 -04:00
parent
ea64a9263c
commit
9371852c7d
@ -2316,14 +2316,15 @@ func createHostAnonymizerForFSMode() map[string]string {
|
|||||||
|
|
||||||
apiEndpoints := getAPIEndpoints()
|
apiEndpoints := getAPIEndpoints()
|
||||||
for _, ep := range apiEndpoints {
|
for _, ep := range apiEndpoints {
|
||||||
if len(ep) > 0 {
|
if len(ep) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if url, err := xnet.ParseHTTPURL(ep); err == nil {
|
if url, err := xnet.ParseHTTPURL(ep); err == nil {
|
||||||
// In FS mode the drive names don't include the host.
|
// In FS mode the drive names don't include the host.
|
||||||
// So mapping just the host should be sufficient.
|
// So mapping just the host should be sufficient.
|
||||||
hostAnonymizer[url.Host] = "server1"
|
hostAnonymizer[url.Host] = "server1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return hostAnonymizer
|
return hostAnonymizer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,6 +177,9 @@ func getConsoleEndpoints() (consoleEndpoints []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getAPIEndpoints() (apiEndpoints []string) {
|
func getAPIEndpoints() (apiEndpoints []string) {
|
||||||
|
if globalMinioEndpoint != "" {
|
||||||
|
return []string{globalMinioEndpoint}
|
||||||
|
}
|
||||||
var ipList []string
|
var ipList []string
|
||||||
if globalMinioHost == "" {
|
if globalMinioHost == "" {
|
||||||
ipList = sortIPs(mustGetLocalIP4().ToSlice())
|
ipList = sortIPs(mustGetLocalIP4().ToSlice())
|
||||||
|
@ -1461,7 +1461,7 @@ func (sys *NotificationSys) GetClusterMetrics(ctx context.Context) chan Metric {
|
|||||||
// Speedtest run GET/PUT tests at input concurrency for requested object size,
|
// Speedtest run GET/PUT tests at input concurrency for requested object size,
|
||||||
// optionally you can extend the tests longer with time.Duration.
|
// optionally you can extend the tests longer with time.Duration.
|
||||||
func (sys *NotificationSys) Speedtest(ctx context.Context, size int, concurrent int, duration time.Duration) []madmin.SpeedtestResult {
|
func (sys *NotificationSys) Speedtest(ctx context.Context, size int, concurrent int, duration time.Duration) []madmin.SpeedtestResult {
|
||||||
results := make([]madmin.SpeedtestResult, len(sys.peerClients)+1)
|
results := make([]madmin.SpeedtestResult, len(sys.allPeerClients))
|
||||||
|
|
||||||
scheme := "http"
|
scheme := "http"
|
||||||
if globalIsTLS {
|
if globalIsTLS {
|
||||||
@ -1494,7 +1494,11 @@ func (sys *NotificationSys) Speedtest(ctx context.Context, size int, concurrent
|
|||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
r, err := selfSpeedtest(ctx, size, concurrent, duration)
|
r, err := selfSpeedtest(ctx, size, concurrent, duration)
|
||||||
results[len(results)-1].Endpoint = globalMinioEndpoint
|
u := &url.URL{
|
||||||
|
Scheme: scheme,
|
||||||
|
Host: globalLocalNodeName,
|
||||||
|
}
|
||||||
|
results[len(results)-1].Endpoint = u.String()
|
||||||
results[len(results)-1].Err = err
|
results[len(results)-1].Err = err
|
||||||
if err == nil {
|
if err == nil {
|
||||||
results[len(results)-1].Uploads = r.Uploads
|
results[len(results)-1].Uploads = r.Uploads
|
||||||
|
Loading…
x
Reference in New Issue
Block a user