mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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 {
|
for name, vmEntry := range oldCache {
|
||||||
// if the nil cache entry has existed for 15 minutes in the cache
|
// if the nil cache entry has existed for 15 minutes in the cache
|
||||||
// then it should not be added back to 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)
|
klog.V(5).Infof("ignoring expired entries from old cache for %s", name)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user