diff --git a/component/taskd/taskd/go/common/utils/utils.go b/component/taskd/taskd/go/common/utils/utils.go index 2ecd06746d9d22447c64968804d1abb81a8946ad..f658ef7ce15c0dd66be3d276571cbc22a743d0b5 100644 --- a/component/taskd/taskd/go/common/utils/utils.go +++ b/component/taskd/taskd/go/common/utils/utils.go @@ -256,5 +256,5 @@ func GetClusterdAddr() (string, error) { return "", fmt.Errorf("%s is NOT a valid IP address", ipFromEnv) } - return string(parsedIP) + constant.ClusterdPort, nil + return ipFromEnv + constant.ClusterdPort, nil } diff --git a/component/taskd/taskd/go/framework_backend/manager/manager.go b/component/taskd/taskd/go/framework_backend/manager/manager.go index 419ea8461f118b18613bd3e5fde07c0e16395875..4579ea24063b9497c53f90d79d7e07c054ac2b2a 100644 --- a/component/taskd/taskd/go/framework_backend/manager/manager.go +++ b/component/taskd/taskd/go/framework_backend/manager/manager.go @@ -155,7 +155,7 @@ func (m *BaseManager) registerClusterD(retryTime time.Duration) { } conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - hwlog.RunLog.Error("init clusterd connect failed") + hwlog.RunLog.Errorf("init clusterd connect err: %v", err) m.registerClusterD(retryTime + 1) return } diff --git a/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go b/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go index 1f872b2b45a4286c8df6c13ab85be394c8fc4296..50291d77db2aa038dfb6c781c40551cd677fb7bd 100644 --- a/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go +++ b/component/taskd/taskd/go/framework_backend/manager/plugins/faultdig/profiling.go @@ -225,7 +225,9 @@ func (p *PfPlugin) handleNewCmd() { // PullMsg return Msg func (p *PfPlugin) PullMsg() ([]infrastructure.Msg, error) { hwlog.RunLog.Infof("Profiling PullMsg: %s", utils.ObjToString(p.pullMsg)) - return p.pullMsg, nil + res := p.pullMsg + p.pullMsg = make([]infrastructure.Msg, 0) + return res, nil } // NewProfilingPlugin return New ProfilingPlugin @@ -261,7 +263,7 @@ func (p *PfPlugin) changeCmd(cmd constant.ProfilingDomainCmd) { } func (p *PfPlugin) getAllWorkerName() []string { - names := make([]string, len(p.workerStatus.workers)) + names := make([]string, 0, len(p.workerStatus.workers)) for name := range p.workerStatus.workers { names = append(names, name) }