mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00:00
replication: centralize healthcheck for remote targets (#15516)
This PR moves health check from minio-go client to being managed on the server. Additionally integrating health check into site replication
This commit is contained in:
1 parent
48640b1de2
commit
21fe14201f
10 files changed
+169
-40
No files matched your search
@@ -2217,6 +2217,9 @@ func getAdminClient(endpoint, accessKey, secretKey string) (*madmin.AdminClient,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if globalBucketTargetSys.isOffline(epURL) {
|
||||
return nil, RemoteTargetConnectionErr{Endpoint: epURL.String(), Err: fmt.Errorf("remote target is offline for endpoint %s", epURL.String())}
|
||||
}
|
||||
client, err := madmin.New(epURL.Host, accessKey, secretKey, epURL.Scheme == "https")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -2230,6 +2233,10 @@ func getS3Client(pc madmin.PeerSite) (*minioClient.Client, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if globalBucketTargetSys.isOffline(ep) {
|
||||
return nil, RemoteTargetConnectionErr{Endpoint: ep.String(), Err: fmt.Errorf("remote target is offline for endpoint %s", ep.String())}
|
||||
}
|
||||
|
||||
return minioClient.New(ep.Host, &minioClient.Options{
|
||||
Creds: credentials.NewStaticV4(pc.AccessKey, pc.SecretKey, ""),
|
||||
Secure: ep.Scheme == "https",
|
||||
|
||||
Reference in new issue
Block a user