mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-18 18:03:35 +08:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user