diff --git a/pkg/compute/models/storagecaches.go b/pkg/compute/models/storagecaches.go index bc4e8e0556..7792a676a7 100644 --- a/pkg/compute/models/storagecaches.go +++ b/pkg/compute/models/storagecaches.go @@ -378,7 +378,7 @@ func (self *SStoragecache) StartImageUncacheTask(ctx context.Context, userCred m func (self *SStoragecache) GetIStorageCache() (cloudprovider.ICloudStoragecache, error) { storages := self.getValidStorages() if len(storages) == 0 { - msg := "no storages for this storagecache???" + msg := fmt.Sprintf("no storages for this storagecache %s(%s)???", self.Name, self.Id) log.Errorf(msg) return nil, fmt.Errorf(msg) } diff --git a/pkg/util/zstack/storagecache.go b/pkg/util/zstack/storagecache.go index 9da4a23863..e35b475f65 100644 --- a/pkg/util/zstack/storagecache.go +++ b/pkg/util/zstack/storagecache.go @@ -123,6 +123,7 @@ func (self *SStoragecache) uploadImage(ctx context.Context, userCred mcclient.To if err != nil { return "", err } + img.storageCache = self err = cloudprovider.WaitStatus(img, api.CACHED_IMAGE_STATUS_READY, time.Second*5, time.Minute*10) //windows镜像转换比较慢,等待时间稍微设长一些 if err != nil { log.Errorf("waitting for image %s(%s) status ready timeout", img.Name, img.UUID)