Merge pull request #1117 in YUNIONIO/onecloud from ~QIUJIAN/onecloud:hotfix/qj-vmware-sync-hoststorage-ignore-storage to release/2.6.0

* commit '59cab59e5ea800392c87e311d9e15ee7ea26aa17':
  fix: ignore syncing storage when syncing vmware hosts
This commit is contained in:
邱剑
2019-02-25 17:31:42 +08:00
+7 -1
View File
@@ -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 {