aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_cluster_check.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-04-01 20:25:35 -0700
committerchrislu <chris.lu@gmail.com>2022-04-01 20:25:35 -0700
commit105578a2f2425b568abaa032cd9fb3f744207a92 (patch)
treebd81a064768d735c2a33be59a8b7d661371265f4 /weed/shell/command_cluster_check.go
parent4ecba915f3c1f25f4f6d603686855535ee23811c (diff)
downloadseaweedfs-105578a2f2425b568abaa032cd9fb3f744207a92.tar.xz
seaweedfs-105578a2f2425b568abaa032cd9fb3f744207a92.zip
skip pinging self for master and volume server
Diffstat (limited to 'weed/shell/command_cluster_check.go')
-rw-r--r--weed/shell/command_cluster_check.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/weed/shell/command_cluster_check.go b/weed/shell/command_cluster_check.go
index 3899cdc9a..a050c3f12 100644
--- a/weed/shell/command_cluster_check.go
+++ b/weed/shell/command_cluster_check.go
@@ -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{