aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFarbod <105163300+itsfarbod@users.noreply.github.com>2023-12-12 19:16:45 +0330
committerGitHub <noreply@github.com>2023-12-12 07:46:45 -0800
commitd5c01e5ceb91c8ebd97e957376488d03c4867836 (patch)
treeee5959e168b853e7aa2d28342962d26433287b2a
parent61b05fad9500ee54908fe33d9185cc28bee5ba63 (diff)
downloadseaweedfs-d5c01e5ceb91c8ebd97e957376488d03c4867836.tar.xz
seaweedfs-d5c01e5ceb91c8ebd97e957376488d03c4867836.zip
Remote gateway Bug fix (#5100)
-rw-r--r--weed/filer/remote_mapping.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/filer/remote_mapping.go b/weed/filer/remote_mapping.go
index 8a7bea3d6..c8adbeb4d 100644
--- a/weed/filer/remote_mapping.go
+++ b/weed/filer/remote_mapping.go
@@ -15,9 +15,11 @@ func ReadMountMappings(grpcDialOption grpc.DialOption, filerAddress pb.ServerAdd
oldContent, readErr = ReadInsideFiler(client, DirectoryEtcRemote, REMOTE_STORAGE_MOUNT_FILE)
return readErr
}); readErr != nil {
- return nil, readErr
+ if readErr != filer_pb.ErrNotFound {
+ return nil, fmt.Errorf("read existing mapping: %v", readErr)
+ }
+ oldContent = nil
}
-
mappings, readErr = UnmarshalRemoteStorageMappings(oldContent)
if readErr != nil {
return nil, fmt.Errorf("unmarshal mappings: %v", readErr)