mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #1104 in YUNIONIO/onecloud from ~LIZEXI/onecloud:hotfix/scheduler-backuphost to release/2.6.0
* commit 'cc09b6e31ff3762836a83fb53ca68dbe98f1932e': scheduler: fix prefer backup host schedule fail
This commit is contained in:
@@ -167,6 +167,12 @@ func NewSchedData(sjson *simplejson.Json, count int64, byTest bool) (*SchedData,
|
||||
if backupHostID, ok := sjson.CheckGet("prefer_backup_host_id"); ok {
|
||||
if backHost, err := backupHostID.String(); err == nil {
|
||||
data.BackupHostID = backHost
|
||||
candidates = append(candidates, backHost)
|
||||
}
|
||||
} else if backupHostID, ok := sjson.CheckGet("prefer_backup_host"); ok {
|
||||
if backHost, err := backupHostID.String(); err == nil {
|
||||
data.BackupHostID = backHost
|
||||
candidates = append(candidates, backHost)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user