Browse Source

pass along volume server grpc port

fix https://github.com/seaweedfs/seaweedfs/issues/5617
pull/4102/merge
chrislu 7 months ago
parent
commit
3e7a92061b
  1. 2
      weed/server/master_grpc_server.go
  2. 1
      weed/topology/topology_info.go
  3. 1
      weed/topology/volume_growth.go

2
weed/server/master_grpc_server.go

@ -73,6 +73,7 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
DataCenter: dn.GetDataCenterId(), DataCenter: dn.GetDataCenterId(),
Url: dn.Url(), Url: dn.Url(),
PublicUrl: dn.PublicUrl, PublicUrl: dn.PublicUrl,
GrpcPort: uint32(dn.GrpcPort),
} }
for _, v := range dn.GetVolumes() { for _, v := range dn.GetVolumes() {
message.DeletedVids = append(message.DeletedVids, uint32(v.Id)) message.DeletedVids = append(message.DeletedVids, uint32(v.Id))
@ -166,6 +167,7 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
Url: dn.Url(), Url: dn.Url(),
PublicUrl: dn.PublicUrl, PublicUrl: dn.PublicUrl,
DataCenter: dn.GetDataCenterId(), DataCenter: dn.GetDataCenterId(),
GrpcPort: uint32(dn.GrpcPort),
} }
if len(heartbeat.NewVolumes) > 0 { if len(heartbeat.NewVolumes) > 0 {
stats.MasterReceivedHeartbeatCounter.WithLabelValues("newVolumes").Inc() stats.MasterReceivedHeartbeatCounter.WithLabelValues("newVolumes").Inc()

1
weed/topology/topology_info.go

@ -80,6 +80,7 @@ func (t *Topology) ToVolumeLocations() (volumeLocations []*master_pb.VolumeLocat
Url: dn.Url(), Url: dn.Url(),
PublicUrl: dn.PublicUrl, PublicUrl: dn.PublicUrl,
DataCenter: dn.GetDataCenterId(), DataCenter: dn.GetDataCenterId(),
GrpcPort: uint32(dn.GrpcPort),
} }
for _, v := range dn.GetVolumes() { for _, v := range dn.GetVolumes() {
volumeLocation.NewVids = append(volumeLocation.NewVids, uint32(v.Id)) volumeLocation.NewVids = append(volumeLocation.NewVids, uint32(v.Id))

1
weed/topology/volume_growth.go

@ -129,6 +129,7 @@ func (vg *VolumeGrowth) findAndGrow(grpcDialOption grpc.DialOption, topo *Topolo
Url: server.Url(), Url: server.Url(),
PublicUrl: server.PublicUrl, PublicUrl: server.PublicUrl,
DataCenter: server.GetDataCenterId(), DataCenter: server.GetDataCenterId(),
GrpcPort: uint32(server.GrpcPort),
NewVids: []uint32{uint32(vid)}, NewVids: []uint32{uint32(vid)},
}) })
} }

Loading…
Cancel
Save