fix: ignore syncing storage when syncing vmware hosts

This commit is contained in:
Qiu Jian
2019-02-25 15:54:41 +08:00
parent f878b57fab
commit 59cab59e5e
+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 {