From 59cab59e5ea800392c87e311d9e15ee7ea26aa17 Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Mon, 25 Feb 2019 15:54:41 +0800 Subject: [PATCH] fix: ignore syncing storage when syncing vmware hosts --- pkg/compute/models/hosts.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/compute/models/hosts.go b/pkg/compute/models/hosts.go index 96c664e20c..2979db3c4c 100644 --- a/pkg/compute/models/hosts.go +++ b/pkg/compute/models/hosts.go @@ -1500,7 +1500,13 @@ func (self *SHost) SyncHostStorages(ctx context.Context, userCred mcclient.Token func (self *SHost) syncWithCloudHostStorage(localStorage *SStorage, extStorage cloudprovider.ICloudStorage) error { // do nothing hs := self.GetHoststorageOfId(localStorage.Id) - return hs.syncWithCloudHostStorage(extStorage) + err := hs.syncWithCloudHostStorage(extStorage) + if err != nil { + return err + } + s := hs.GetStorage() + err = s.syncWithCloudStorage(extStorage) + return err } func (self *SHost) isAttach2Storage(storage *SStorage) bool {