Farbod
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
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) |
|
|
oldContent, readErr = ReadInsideFiler(client, DirectoryEtcRemote, REMOTE_STORAGE_MOUNT_FILE) |
|
|
return readErr |
|
|
return readErr |
|
|
}); readErr != nil { |
|
|
}); 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) |
|
|
mappings, readErr = UnmarshalRemoteStorageMappings(oldContent) |
|
|
if readErr != nil { |
|
|
if readErr != nil { |
|
|
return nil, fmt.Errorf("unmarshal mappings: %v", readErr) |
|
|
return nil, fmt.Errorf("unmarshal mappings: %v", readErr) |
|
|