mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Automatic merge from release/2.4.0 -> release/2.5.0
* commit 'fa53945d3fed352f73247fc7f99b03f4b71d8c2d': 避免插入异常数据
This commit is contained in:
@@ -99,7 +99,7 @@ func (manager *SHoststorageManager) ValidateCreateData(ctx context.Context, user
|
||||
}
|
||||
storage := storageTmp.(*SStorage)
|
||||
if storage.StorageType == STORAGE_RBD {
|
||||
pool, _ := data.GetString("poll")
|
||||
pool, _ := data.GetString("pool")
|
||||
data.Add(jsonutils.NewString(fmt.Sprintf("rbd:%s", pool)), "mount_point")
|
||||
}
|
||||
return manager.SJointResourceBaseManager.ValidateCreateData(ctx, userCred, ownerProjId, query, data)
|
||||
|
||||
@@ -309,7 +309,7 @@ func (self *SStorage) PostCreate(ctx context.Context, userCred mcclient.TokenCre
|
||||
sc.Name = fmt.Sprintf("imagecache-%s", self.Id)
|
||||
pool, _ := storageConf.GetString("pool")
|
||||
sc.Path = fmt.Sprintf("rbd:%s", pool)
|
||||
err := StorageManager.TableSpec().Insert(sc)
|
||||
err := StoragecacheManager.TableSpec().Insert(sc)
|
||||
if err != nil {
|
||||
log.Errorln(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user