mirror of https://github.com/k3s-io/k3s
Merge pull request #52046 from dashpole/soft_eviction
Automatic merge from submit-queue (batch tested with PRs 48226, 52046, 52231, 52344, 52352) [BugFix] Soft Eviction timer works correctly fixes #51516 thresholdsMet should not exclude previously met thresholds when we do not have new stats for a threshold. /assign @vishh @derekwaynecarr cc @kubernetes/sig-node-bugspull/6/head
commit
32f1521cc2
|
@ -274,10 +274,6 @@ func (m *managerImpl) synchronize(diskInfoProvider DiskInfoProvider, podFunc Act
|
|||
}
|
||||
debugLogThresholdsWithObservation("thresholds - reclaim not satisfied", thresholds, observations)
|
||||
|
||||
// determine the set of thresholds whose stats have been updated since the last sync
|
||||
thresholds = thresholdsUpdatedStats(thresholds, observations, m.lastObservations)
|
||||
debugLogThresholdsWithObservation("thresholds - updated stats", thresholds, observations)
|
||||
|
||||
// track when a threshold was first observed
|
||||
now := m.clock.Now()
|
||||
thresholdsFirstObservedAt := thresholdsFirstObservedAt(thresholds, m.thresholdsFirstObservedAt, now)
|
||||
|
@ -307,6 +303,11 @@ func (m *managerImpl) synchronize(diskInfoProvider DiskInfoProvider, podFunc Act
|
|||
m.thresholdsFirstObservedAt = thresholdsFirstObservedAt
|
||||
m.nodeConditionsLastObservedAt = nodeConditionsLastObservedAt
|
||||
m.thresholdsMet = thresholds
|
||||
|
||||
// determine the set of thresholds whose stats have been updated since the last sync
|
||||
thresholds = thresholdsUpdatedStats(thresholds, observations, m.lastObservations)
|
||||
debugLogThresholdsWithObservation("thresholds - updated stats", thresholds, observations)
|
||||
|
||||
m.lastObservations = observations
|
||||
m.Unlock()
|
||||
|
||||
|
|
Loading…
Reference in New Issue