mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip pinging self for master and volume server
This commit is contained in:
parent
4ecba915f3
commit
105578a2f2
|
@ -99,6 +99,9 @@ func (c *commandClusterCheck) Do(args []string, commandEnv *CommandEnv, writer i
|
|||
// check between masters
|
||||
for _, sourceMaster := range masters {
|
||||
for _, targetMaster := range masters {
|
||||
if sourceMaster == targetMaster {
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(writer, "checking master %s to %s ... ", string(sourceMaster), string(targetMaster))
|
||||
err := pb.WithMasterClient(false, sourceMaster, commandEnv.option.GrpcDialOption, func(client master_pb.SeaweedClient) error {
|
||||
_, err := client.Ping(context.Background(), &master_pb.PingRequest{
|
||||
|
@ -175,6 +178,9 @@ func (c *commandClusterCheck) Do(args []string, commandEnv *CommandEnv, writer i
|
|||
// check between volume servers
|
||||
for _, sourceVolumeServer := range volumeServers {
|
||||
for _, targetVolumeServer := range volumeServers {
|
||||
if sourceVolumeServer == targetVolumeServer {
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(writer, "checking volume server %s to %s ... ", string(sourceVolumeServer), string(targetVolumeServer))
|
||||
err := pb.WithVolumeServerClient(false, sourceVolumeServer, commandEnv.option.GrpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
|
||||
_, err := client.Ping(context.Background(), &volume_server_pb.PingRequest{
|
||||
|
@ -191,12 +197,9 @@ func (c *commandClusterCheck) Do(args []string, commandEnv *CommandEnv, writer i
|
|||
}
|
||||
}
|
||||
|
||||
// check between filers
|
||||
// check between filers, and need to connect to itself
|
||||
for _, sourceFiler := range filers {
|
||||
for _, targetFiler := range filers {
|
||||
if sourceFiler == targetFiler {
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(writer, "checking filer %s to %s ... ", string(sourceFiler), string(targetFiler))
|
||||
err := pb.WithFilerClient(false, sourceFiler, commandEnv.option.GrpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
||||
_, err := client.Ping(context.Background(), &filer_pb.PingRequest{
|
||||
|
|
Loading…
Reference in a new issue