mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-25 08:20:26 +08:00
DNS节点检查是否需要升级时,加入集群是否可用的条件
This commit is contained in:
@@ -22,5 +22,5 @@ const (
|
|||||||
UserNodeVersion = "0.0.9"
|
UserNodeVersion = "0.0.9"
|
||||||
AuthorityNodeVersion = "0.0.2"
|
AuthorityNodeVersion = "0.0.2"
|
||||||
MonitorNodeVersion = "0.0.2"
|
MonitorNodeVersion = "0.0.2"
|
||||||
DNSNodeVersion = "0.0.1"
|
DNSNodeVersion = "0.0.2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ func (this NSNodeDAO) UpdateNodeStatus(tx *dbs.Tx, nodeId int64, statusJSON []by
|
|||||||
func (this *NSNodeDAO) CountAllLowerVersionNodes(tx *dbs.Tx, version string) (int64, error) {
|
func (this *NSNodeDAO) CountAllLowerVersionNodes(tx *dbs.Tx, version string) (int64, error) {
|
||||||
return this.Query(tx).
|
return this.Query(tx).
|
||||||
State(NSNodeStateEnabled).
|
State(NSNodeStateEnabled).
|
||||||
|
Where("clusterId IN (SELECT id FROM "+SharedNSClusterDAO.Table+" WHERE state=1)").
|
||||||
Where("status IS NOT NULL").
|
Where("status IS NOT NULL").
|
||||||
Where("(JSON_EXTRACT(status, '$.buildVersionCode') IS NULL OR JSON_EXTRACT(status, '$.buildVersionCode')<:version)").
|
Where("(JSON_EXTRACT(status, '$.buildVersionCode') IS NULL OR JSON_EXTRACT(status, '$.buildVersionCode')<:version)").
|
||||||
Param("version", utils.VersionToLong(version)).
|
Param("version", utils.VersionToLong(version)).
|
||||||
|
|||||||
Reference in New Issue
Block a user