From 34d9a6b46a91cdf5924a51f7487d25739a57374d Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 18 Feb 2017 02:52:11 -0800 Subject: [PATCH] Make sure client initializes to proper lock RPC path. (#3763) Fixes a regression introduced in previous commit. --- cmd/namespace-lock.go | 2 +- cmd/storage-rpc-client.go | 4 ++-- cmd/storage-rpc-server.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/namespace-lock.go b/cmd/namespace-lock.go index 492e45ac4..36bd8e71c 100644 --- a/cmd/namespace-lock.go +++ b/cmd/namespace-lock.go @@ -51,7 +51,7 @@ func initDsyncNodes(eps []*url.URL) error { accessKey: cred.AccessKey, secretKey: cred.SecretKey, serverAddr: ep.Host, - serviceEndpoint: pathutil.Join(lockRPCPath, getPath(ep)), + serviceEndpoint: pathutil.Join(minioReservedBucketPath, lockRPCPath, getPath(ep)), secureConn: globalIsSSL, serviceName: "Dsync", }) diff --git a/cmd/storage-rpc-client.go b/cmd/storage-rpc-client.go index 0064fe35d..af90744cd 100644 --- a/cmd/storage-rpc-client.go +++ b/cmd/storage-rpc-client.go @@ -34,7 +34,7 @@ type networkStorage struct { } const ( - storageRPCPath = minioReservedBucketPath + "/storage" + storageRPCPath = "/storage" ) // Converts rpc.ServerError to underlying error. This function is @@ -102,7 +102,7 @@ func newStorageRPC(ep *url.URL) (StorageAPI, error) { } // Dial minio rpc storage http path. - rpcPath := path.Join(storageRPCPath, getPath(ep)) + rpcPath := path.Join(minioReservedBucketPath, storageRPCPath, getPath(ep)) rpcAddr := ep.Host serverCred := serverConfig.GetCredential() diff --git a/cmd/storage-rpc-server.go b/cmd/storage-rpc-server.go index c1e9ab787..1a02cd266 100644 --- a/cmd/storage-rpc-server.go +++ b/cmd/storage-rpc-server.go @@ -234,7 +234,7 @@ func registerStorageRPCRouters(mux *router.Router, srvCmdConfig serverCmdConfig) } // Add minio storage routes. storageRouter := mux.PathPrefix(minioReservedBucketPath).Subrouter() - storageRouter.Path(path.Join("/storage", stServer.path)).Handler(storageRPCServer) + storageRouter.Path(path.Join(storageRPCPath, stServer.path)).Handler(storageRPCServer) } return nil }