mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-29 17:58:36 +08:00
Merge pull request #194 in YUNIONIO/onecloud from ~QUXUAN/onecloud:bugfix/qx-storage-choise to release/2.0.0
* commit 'f3b4b4d3146c9ac5b12bad89eb3d48842984aab0': 避免只使用第一个storage
This commit is contained in:
@@ -529,7 +529,8 @@ func (self *SHost) GetAttachedStorageCapacity() SStorageCapacity {
|
||||
func _getLeastUsedStorage(storages []SStorage, backends []string) *SStorage {
|
||||
var best *SStorage
|
||||
var bestCap int
|
||||
for _, s := range storages {
|
||||
for i := 0; i < len(storages); i++ {
|
||||
s := storages[i]
|
||||
if len(backends) > 0 {
|
||||
in, _ := utils.InStringArray(s.StorageType, backends)
|
||||
if !in {
|
||||
|
||||
Reference in New Issue
Block a user