mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
Merge pull request #5447 from zexi/hotfix/host-storage-update-enabled
region: host update storage set enabled
This commit is contained in:
@@ -817,6 +817,7 @@ func (self *SHost) PerformUpdateStorage(
|
||||
storage.MediumType = self.StorageType
|
||||
storage.Cmtbound = 1.0
|
||||
storage.Status = api.STORAGE_ONLINE
|
||||
storage.Enabled = tristate.True
|
||||
storage.ZoneId = zoneId
|
||||
storage.StoragecacheId = storageCacheId
|
||||
err := StorageManager.TableSpec().Insert(&storage)
|
||||
@@ -844,6 +845,7 @@ func (self *SHost) PerformUpdateStorage(
|
||||
diff, err := db.Update(storage, func() error {
|
||||
storage.Capacity = capacity
|
||||
storage.StoragecacheId = storageCacheId
|
||||
storage.Enabled = tristate.True
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user