Skip to content

Commit 1e36054

Browse files
authored
Merge pull request kubernetes#92681 from ArchangelSDY/fix-vmss-cache
Fix a condition when expiring nil VM entry in VMSS cache
2 parents cada2eb + b948bac commit 1e36054

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func (ss *scaleSet) newVMSSVirtualMachinesCache() (*azcache.TimedCache, error) {
182182
for name, vmEntry := range oldCache {
183183
// if the nil cache entry has existed for 15 minutes in the cache
184184
// then it should not be added back to the cache
185-
if vmEntry.virtualMachine == nil || time.Since(vmEntry.lastUpdate) > 15*time.Minute {
185+
if vmEntry.virtualMachine == nil && time.Since(vmEntry.lastUpdate) > 15*time.Minute {
186186
klog.V(5).Infof("ignoring expired entries from old cache for %s", name)
187187
continue
188188
}

0 commit comments

Comments
 (0)