mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-16 02:58:35 +02:00
pb: return empty server address for malformed grpc addresses
GrpcAddressToServerAddress used to return the unparseable input on a hostAndPort failure, so a malformed raft address (e.g. "host:abc") flowed into admin dashboard master maps unchanged. Return an empty string instead, skip empty conversions at the two raft-cluster merge sites, and drop the now-stale comment about the fatal exit the earlier commit removed.
This commit is contained in:
1 parent
0ae7874ed9
commit
0d6024e2e0
3 files changed
+10
-4
No files matched your search
@@ -1351,6 +1351,9 @@ func (s *AdminServer) GetClusterMasters() (*ClusterMastersData, error) {
|
||||
for _, server := range resp.ClusterServers {
|
||||
// Raft stores gRPC addresses, convert to HTTP address
|
||||
httpAddress := pb.GrpcAddressToServerAddress(server.Address)
|
||||
if httpAddress == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
// Update existing master info or create new one
|
||||
if masterInfo, exists := masterMap[httpAddress]; exists {
|
||||
|
||||
Reference in new issue
Block a user