mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
fix: fail to snapshot and clone due to mismatch class metadata (#13857)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -391,7 +391,11 @@ func (manager *SInstanceSnapshotManager) CreateInstanceSnapshot(ctx context.Cont
|
||||
instanceSnapshot.MemoryFileHostId = guest.HostId
|
||||
err := manager.TableSpec().Insert(ctx, instanceSnapshot)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errors.Wrap(err, "Insert")
|
||||
}
|
||||
err = db.Inherit(ctx, guest, instanceSnapshot)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "Inherit ClassMetadata")
|
||||
}
|
||||
return instanceSnapshot, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user