Skip to content

Commit

Permalink
Merge pull request #92681 from ArchangelSDY/fix-vmss-cache
Browse files Browse the repository at this point in the history
Fix a condition when expiring nil VM entry in VMSS cache
  • Loading branch information
k8s-ci-robot committed Jul 9, 2020
2 parents cada2eb + b948bac commit 1e36054
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -182,7 +182,7 @@ func (ss *scaleSet) newVMSSVirtualMachinesCache() (*azcache.TimedCache, error) {
for name, vmEntry := range oldCache {
// if the nil cache entry has existed for 15 minutes in the cache
// then it should not be added back to the cache
if vmEntry.virtualMachine == nil || time.Since(vmEntry.lastUpdate) > 15*time.Minute {
if vmEntry.virtualMachine == nil && time.Since(vmEntry.lastUpdate) > 15*time.Minute {
klog.V(5).Infof("ignoring expired entries from old cache for %s", name)
continue
}
Expand Down

0 comments on commit 1e36054

Please sign in to comment.