Merge pull request #12863 from rainzm/automated-cherry-pick-of-#12861-upstream-release-3.7

Automated cherry pick of #12861: fix(hostman): update storagecacheimage status from 'ready' to 'avtive'
This commit is contained in:
Zexi Li
2021-12-13 17:15:18 +08:00
committed by GitHub
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ func (l *SLocalImageCache) fetch(ctx context.Context, zone, srcUrl, format strin
l.remoteFile.Fetch() {
if len(l.Manager.GetId()) > 0 {
_, err := hostutils.RemoteStoragecacheCacheImage(ctx,
l.Manager.GetId(), l.imageId, "ready", l.GetPath())
l.Manager.GetId(), l.imageId, "active", l.GetPath())
if err != nil {
log.Errorf("Fail to update host cached image: %s", err)
}
+1 -1
View File
@@ -504,7 +504,7 @@ func (as *SAgentStorage) SaveToGlance(ctx context.Context, params interface{}) (
}
imagecacheManager.LoadImageCache(imageId)
_, err := hostutils.RemoteStoragecacheCacheImage(ctx,
imagecacheManager.GetId(), imageId, "ready", dstPath)
imagecacheManager.GetId(), imageId, "active", dstPath)
if err != nil {
log.Errorf("Fail to remote cache image: %s", err)
}
+1 -1
View File
@@ -286,7 +286,7 @@ func (s *SLocalStorage) SaveToGlance(ctx context.Context, params interface{}) (j
}
imagecacheManager.LoadImageCache(imageId)
_, err := hostutils.RemoteStoragecacheCacheImage(ctx,
imagecacheManager.GetId(), imageId, "ready", dstPath)
imagecacheManager.GetId(), imageId, "active", dstPath)
if err != nil {
log.Errorf("Fail to remote cache image: %s", err)
}
+1 -1
View File
@@ -720,7 +720,7 @@ func (s *SRbdStorage) SaveToGlance(ctx context.Context, params interface{}) (jso
}
rbdImageCache.LoadImageCache(imageId)
_, err := hostutils.RemoteStoragecacheCacheImage(ctx, rbdImageCache.GetId(), imageId, "ready", imagePath)
_, err := hostutils.RemoteStoragecacheCacheImage(ctx, rbdImageCache.GetId(), imageId, "active", imagePath)
if err != nil {
log.Errorf("Fail to remote cache image: %v", err)
}