mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-05 15:31:49 +08:00
Automatic merge from release/2.7.0 -> release/2.8.0
* commit 'aef848974c9ec2329ac72a910309b3a3b011cfae': fix: try to recover image properties(mindisk, format) at startup
This commit is contained in:
@@ -1033,7 +1033,7 @@ func (self *SImage) DoCheckStatus(ctx context.Context, userCred mcclient.TokenCr
|
||||
format := string(img.Format)
|
||||
virtualSizeMB := int32(img.SizeBytes / 1024 / 1024)
|
||||
if (len(format) > 0 && self.DiskFormat != format) || (virtualSizeMB > 0 && self.MinDiskMB != virtualSizeMB) {
|
||||
self.GetModelManager().TableSpec().Update(self, func() error {
|
||||
db.Update(self, func() error {
|
||||
if len(format) > 0 {
|
||||
self.DiskFormat = format
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user