feat(region): increase the log for debugging when syncing cloudimage

This commit is contained in:
rainzm
2021-04-20 10:24:18 +08:00
parent 93ce4b3dbd
commit d7224cd064
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -577,6 +577,7 @@ func syncZoneStorages(ctx context.Context, userCred mcclient.TokenCredential, sy
}
func syncStorageCaches(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, localStorage *SStorage, remoteStorage cloudprovider.ICloudStorage) (cachePair sStoragecacheSyncPair) {
log.Debugf("syncStorageCaches for storage %s", localStorage.GetId())
remoteCache := remoteStorage.GetIStoragecache()
if remoteCache == nil {
log.Errorf("remote storageCache is nil")
@@ -1343,7 +1344,7 @@ func syncOnPremiseCloudProviderInfo(
result := storageCachePairs[i].syncCloudImages(ctx, userCred)
syncResults.Add(StoragecachedimageManager, result)
msg := result.Result()
log.Infof("syncCloudImages result: %s", msg)
log.Infof("syncCloudImages for stroagecache %s result: %s", storageCachePairs[i].local.GetId(), msg)
// }
}
}
+6 -1
View File
@@ -173,8 +173,13 @@ func (self *SDatastoreImageCache) GetIImageInTemplateVMs() ([]cloudprovider.IClo
}
log.Infof("get templates successfully")
log.Debugf("fake template name: ")
for i := range fakeTemplates {
log.Infof("fake template name: %s", fakeTemplates[i].GetName())
log.Debugf("%s ", fakeTemplates[i].GetName())
}
log.Debugf("real template name: ")
for i := range realTemplates {
log.Debugf("%s ", realTemplates[i].GetName())
}
return ret, nil
}