mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-18 12:47:50 +08:00
purge cluster id
This commit is contained in:
parent
0833057503
commit
5c0f01c0eb
@ -84,8 +84,6 @@ func (fs *FilerServer) Ping(ctx context.Context, req *filer_pb.PingRequest) (res
|
|||||||
|
|
||||||
func (fs *FilerServer) GetFilerConfiguration(ctx context.Context, req *filer_pb.GetFilerConfigurationRequest) (resp *filer_pb.GetFilerConfigurationResponse, err error) {
|
func (fs *FilerServer) GetFilerConfiguration(ctx context.Context, req *filer_pb.GetFilerConfigurationRequest) (resp *filer_pb.GetFilerConfigurationResponse, err error) {
|
||||||
|
|
||||||
clusterId, _ := fs.filer.Store.KvGet(context.Background(), []byte("clusterId"))
|
|
||||||
|
|
||||||
t := &filer_pb.GetFilerConfigurationResponse{
|
t := &filer_pb.GetFilerConfigurationResponse{
|
||||||
Masters: fs.option.Masters.GetInstancesAsStrings(),
|
Masters: fs.option.Masters.GetInstancesAsStrings(),
|
||||||
Collection: fs.option.Collection,
|
Collection: fs.option.Collection,
|
||||||
@ -97,7 +95,6 @@ func (fs *FilerServer) GetFilerConfiguration(ctx context.Context, req *filer_pb.
|
|||||||
MetricsAddress: fs.metricsAddress,
|
MetricsAddress: fs.metricsAddress,
|
||||||
MetricsIntervalSec: int32(fs.metricsIntervalSec),
|
MetricsIntervalSec: int32(fs.metricsIntervalSec),
|
||||||
Version: util.Version(),
|
Version: util.Version(),
|
||||||
ClusterId: string(clusterId),
|
|
||||||
FilerGroup: fs.option.FilerGroup,
|
FilerGroup: fs.option.FilerGroup,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/cluster"
|
"github.com/seaweedfs/seaweedfs/weed/cluster"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util/grace"
|
"github.com/seaweedfs/seaweedfs/weed/util/grace"
|
||||||
@ -74,24 +73,6 @@ func RunShell(options ShellOptions) {
|
|||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
|
|
||||||
if commandEnv.option.FilerAddress != "" {
|
|
||||||
commandEnv.WithFilerClient(false, func(filerClient filer_pb.SeaweedFilerClient) error {
|
|
||||||
resp, err := filerClient.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if resp.ClusterId != "" {
|
|
||||||
fmt.Printf(`
|
|
||||||
---
|
|
||||||
Free Monitoring Data URL:
|
|
||||||
https://cloud.seaweedfs.com/ui/%s
|
|
||||||
---
|
|
||||||
`, resp.ClusterId)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
for {
|
for {
|
||||||
cmd, err := line.Prompt("> ")
|
cmd, err := line.Prompt("> ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user