边缘节点没有集群的时候视为删除

This commit is contained in:
刘祥超
2021-08-07 10:12:17 +08:00
parent 5a13c7663c
commit 566c04f080

View File

@@ -1238,6 +1238,11 @@ func (this *NodeDAO) DeleteNodeFromCluster(tx *dbs.Tx, nodeId int64, clusterId i
op.Id = nodeId op.Id = nodeId
op.ClusterId = newClusterId op.ClusterId = newClusterId
op.SecondaryClusterIds = secondaryClusterIdsJSON op.SecondaryClusterIds = secondaryClusterIdsJSON
if newClusterId == 0 {
op.State = NodeStateDisabled
}
return this.Save(tx, op) return this.Save(tx, op)
} }