From fd6ea93cb04aa194a88291c6083b2c7a82527a12 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Wed, 11 Mar 2020 15:56:38 +0800 Subject: [PATCH] region: host update storage set enabled --- pkg/compute/models/hosts.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/compute/models/hosts.go b/pkg/compute/models/hosts.go index 641df3f8e7..e535fd9759 100644 --- a/pkg/compute/models/hosts.go +++ b/pkg/compute/models/hosts.go @@ -741,6 +741,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) @@ -768,6 +769,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 {