Commit 7f5e6478 authored by duanjinfei's avatar duanjinfei

update nm status

parent 95b3ab71
......@@ -108,6 +108,6 @@ func (n *NodeManagerClient) GetStatus() bool {
func (n *NodeManagerClient) UpdateStatus(status bool) {
n.mutex.Lock()
defer n.mutex.Unlock()
n.Status = status
n.mutex.Unlock()
}
......@@ -21,7 +21,8 @@ func monitorNodeManagerSeed() {
seedServiceClient := operate.ConnNmGrpc(seed)
if seedServiceClient == nil {
if connectNmCumulativeCount == conf.GetConfig().AllowConnNmCount {
panic("Dial nm seed service client failed")
log.Error("Dial nm seed service client failed")
continue
}
log.Warn("Connect nm seed service client is nil")
connectNmCumulativeCount++
......@@ -30,7 +31,8 @@ func monitorNodeManagerSeed() {
list, err := seedServiceClient.ManagerList(context.Background(), &nodeManagerV1.ManagerListRequest{}, grpc.EmptyCallOption{})
if err != nil {
if connectNmCumulativeCount == conf.GetConfig().AllowConnNmCount {
panic("Nm seed seed service is dealing")
log.Error("Nm seed seed service is dealing")
continue
}
log.WithError(err).Warn("Get manager list failed through nm seed service")
connectNmCumulativeCount++
......
......@@ -269,6 +269,7 @@ func handlerMsg(nodeManager *models.NodeManagerClient,
case rev := <-nodeManagerMsgChan:
{
if !nodeManager.Status {
log.Warn("handlerMsg -> node manager is not running")
return
}
heartbeatReq := rev.GetHeartbeatRequest()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment