From d6db54f9e1493a378c54583d850e0cb7f907bdc4 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Tue, 11 Jan 2022 10:42:53 +0800 Subject: [PATCH] feat(scheduler): log CheckDisksAllocable skipped storage --- pkg/compute/baremetal/diskconfig.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/compute/baremetal/diskconfig.go b/pkg/compute/baremetal/diskconfig.go index 8623bdd198..a8821f4454 100644 --- a/pkg/compute/baremetal/diskconfig.go +++ b/pkg/compute/baremetal/diskconfig.go @@ -21,6 +21,7 @@ import ( "strconv" "strings" + "yunion.io/x/jsonutils" "yunion.io/x/log" "yunion.io/x/pkg/util/sets" "yunion.io/x/pkg/utils" @@ -426,6 +427,8 @@ func CheckDisksAllocable(layouts []Layout, disks []*api.DiskConfig) (bool, []*ap storeFreeSize = -1 } } else { + store := layouts[storeIndex] + log.Warningf("Disk size %dMB large than storage size %dMB, skip storage %s", disk.SizeMb, storeFreeSize, jsonutils.Marshal(store).PrettyString()) storeIndex++ storeFreeSize = -1 }