Browse Source

add TLS grpc support for filer meta clients

pull/2237/head
Chris Lu 3 years ago
parent
commit
3afbf04007
  1. 4
      weed/command/filer_backup.go
  2. 1
      weed/command/filer_meta_backup.go
  3. 1
      weed/command/filer_meta_tail.go
  4. 1
      weed/command/filer_sync.go
  5. 1
      weed/command/iam.go

4
weed/command/filer_backup.go

@ -52,11 +52,11 @@ var cmdFilerBackup = &Command{
func runFilerBackup(cmd *Command, args []string) bool {
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client")
util.LoadConfiguration("security", false)
util.LoadConfiguration("replication", true)
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client")
for {
err := doFilerBackup(grpcDialOption, &filerBackupOptions)
if err != nil {

1
weed/command/filer_meta_backup.go

@ -53,6 +53,7 @@ The backup writes to another filer store specified in a backup_filer.toml.
func runFilerMetaBackup(cmd *Command, args []string) bool {
util.LoadConfiguration("security", false)
metaBackup.grpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client")
// load backup_filer.toml

1
weed/command/filer_meta_tail.go

@ -45,6 +45,7 @@ var (
func runFilerMetaTail(cmd *Command, args []string) bool {
util.LoadConfiguration("security", false)
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client")
var filterFunc func(dir, fname string) bool

1
weed/command/filer_sync.go

@ -89,6 +89,7 @@ var cmdFilerSynchronize = &Command{
func runFilerSynchronize(cmd *Command, args []string) bool {
util.LoadConfiguration("security", false)
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client")
grace.SetupProfiling(*syncCpuProfile, *syncMemProfile)

1
weed/command/iam.go

@ -49,6 +49,7 @@ func (iamopt *IamOptions) startIamServer() bool {
return false
}
util.LoadConfiguration("security", false)
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client")
for {
err = pb.WithGrpcFilerClient(filerGrpcAddress, grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {

Loading…
Cancel
Save