pass backend config from master to volume servers

This commit is contained in:
Chris Lu
2019-11-29 01:05:09 -08:00
parent 0e79a44604
commit 0da7b894cc
10 changed files with 485 additions and 354 deletions

View File

@@ -6,6 +6,7 @@ import (
"time"
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/storage/backend"
"github.com/chrislusf/seaweedfs/weed/storage/erasure_coding"
"github.com/spf13/viper"
"google.golang.org/grpc"
@@ -90,6 +91,9 @@ func (vs *VolumeServer) doHeartbeat(ctx context.Context, masterNode, masterGrpcA
vs.MetricsAddress = in.GetMetricsAddress()
vs.MetricsIntervalSec = int(in.GetMetricsIntervalSeconds())
}
if len(in.StorageBackends) > 0 {
backend.LoadFromPbStorageBackends(in.StorageBackends)
}
}
}()