mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
fix: imageinfo.OsInfo empty for 3.8 (#14507)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -165,6 +165,10 @@ func (self *ImageProbeTask) updateImageMetadata(
|
||||
}
|
||||
|
||||
func (self *ImageProbeTask) updateImageInfo(ctx context.Context, image *models.SImage, imageInfo *deployapi.ImageInfo) {
|
||||
if imageInfo.OsInfo == nil {
|
||||
log.Warningln("image info.OsInfo is empty")
|
||||
return
|
||||
}
|
||||
imageProperties := jsonutils.Marshal(imageInfo.OsInfo).(*jsonutils.JSONDict)
|
||||
if len(imageInfo.OsInfo.Arch) > 0 {
|
||||
imageProperties.Set(api.IMAGE_OS_ARCH, jsonutils.NewString(imageInfo.OsInfo.Arch))
|
||||
|
||||
Reference in New Issue
Block a user