mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-02 14:40:26 +08:00
边缘节点没有集群的时候视为删除
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user