mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
Lock: Use REST API instead of RPC (#7469)
In distributed mode, use REST API to acquire and manage locks instead of RPC. RPC has been completely removed from MinIO source. Since we are moving from RPC to REST, we cannot use rolling upgrades as the nodes that have not yet been upgraded cannot talk to the ones that have been upgraded. We expect all minio processes on all nodes to be stopped and then the upgrade process to be completed. Also force http1.1 for inter-node communication
This commit is contained in:
@@ -189,9 +189,7 @@ func testStorageInfoWebHandler(obj ObjectLayer, instanceType string, t TestErrHa
|
||||
|
||||
rec := httptest.NewRecorder()
|
||||
|
||||
storageInfoRequest := AuthArgs{
|
||||
RPCVersion: globalRPCAPIVersion,
|
||||
}
|
||||
storageInfoRequest := &WebGenericArgs{}
|
||||
storageInfoReply := &StorageInfoRep{}
|
||||
req, err := newTestWebRPCRequest("Web.StorageInfo", authorization, storageInfoRequest)
|
||||
if err != nil {
|
||||
@@ -224,9 +222,7 @@ func testServerInfoWebHandler(obj ObjectLayer, instanceType string, t TestErrHan
|
||||
|
||||
rec := httptest.NewRecorder()
|
||||
|
||||
serverInfoRequest := AuthArgs{
|
||||
RPCVersion: globalRPCAPIVersion,
|
||||
}
|
||||
serverInfoRequest := &WebGenericArgs{}
|
||||
serverInfoReply := &ServerInfoRep{}
|
||||
req, err := newTestWebRPCRequest("Web.ServerInfo", authorization, serverInfoRequest)
|
||||
if err != nil {
|
||||
@@ -1527,11 +1523,8 @@ func TestWebCheckAuthorization(t *testing.T) {
|
||||
"PresignedGet",
|
||||
}
|
||||
for _, rpcCall := range webRPCs {
|
||||
args := &AuthArgs{
|
||||
RPCVersion: globalRPCAPIVersion,
|
||||
}
|
||||
reply := &WebGenericRep{}
|
||||
req, nerr := newTestWebRPCRequest("Web."+rpcCall, "Bearer fooauthorization", args)
|
||||
req, nerr := newTestWebRPCRequest("Web."+rpcCall, "Bearer fooauthorization", &WebGenericArgs{})
|
||||
if nerr != nil {
|
||||
t.Fatalf("Test %s: Failed to create HTTP request: <ERROR> %v", rpcCall, nerr)
|
||||
}
|
||||
@@ -1634,7 +1627,7 @@ func TestWebObjectLayerFaultyDisks(t *testing.T) {
|
||||
RepArgs interface{}
|
||||
}{
|
||||
{"MakeBucket", MakeBucketArgs{BucketName: bucketName}, WebGenericRep{}},
|
||||
{"ListBuckets", AuthArgs{RPCVersion: globalRPCAPIVersion}, ListBucketsRep{}},
|
||||
{"ListBuckets", WebGenericArgs{}, ListBucketsRep{}},
|
||||
{"ListObjects", ListObjectsArgs{BucketName: bucketName, Prefix: ""}, ListObjectsRep{}},
|
||||
{"GetBucketPolicy", GetBucketPolicyArgs{BucketName: bucketName, Prefix: ""}, GetBucketPolicyRep{}},
|
||||
{"SetBucketPolicy", SetBucketPolicyWebArgs{BucketName: bucketName, Prefix: "", Policy: "none"}, WebGenericRep{}},
|
||||
@@ -1658,9 +1651,7 @@ func TestWebObjectLayerFaultyDisks(t *testing.T) {
|
||||
}
|
||||
|
||||
// Test Web.StorageInfo
|
||||
storageInfoRequest := AuthArgs{
|
||||
RPCVersion: globalRPCAPIVersion,
|
||||
}
|
||||
storageInfoRequest := &WebGenericArgs{}
|
||||
storageInfoReply := &StorageInfoRep{}
|
||||
req, err := newTestWebRPCRequest("Web.StorageInfo", authorization, storageInfoRequest)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user