mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Fix a condition when expiring nil VM entry in VMSS cache
This commit is contained in:
parent
180af4240c
commit
b948bac45a
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user