mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 11:25:41 +03:00
core: log CSI GC cutoff index only on non-forced GC (#11997)
Non-CSI garbage collection tasks on the server only log the cutoff index in the case where it's not a forced GC from `nomad system gc`. Do the same for CSI for consistency.
This commit is contained in:
@@ -767,12 +767,11 @@ func (c *CoreScheduler) csiVolumeClaimGC(eval *structs.Evaluation) error {
|
||||
tt := c.srv.fsm.TimeTable()
|
||||
cutoff := time.Now().UTC().Add(-1 * c.srv.config.CSIVolumeClaimGCThreshold)
|
||||
oldThreshold = tt.NearestIndex(cutoff)
|
||||
c.logger.Debug("CSI volume claim GC scanning before cutoff index",
|
||||
"index", oldThreshold,
|
||||
"csi_volume_claim_gc_threshold", c.srv.config.CSIVolumeClaimGCThreshold)
|
||||
}
|
||||
|
||||
c.logger.Debug("CSI volume claim GC scanning before cutoff index",
|
||||
"index", oldThreshold,
|
||||
"csi_volume_claim_gc_threshold", c.srv.config.CSIVolumeClaimGCThreshold)
|
||||
|
||||
for i := iter.Next(); i != nil; i = iter.Next() {
|
||||
vol := i.(*structs.CSIVolume)
|
||||
|
||||
@@ -821,11 +820,10 @@ func (c *CoreScheduler) csiPluginGC(eval *structs.Evaluation) error {
|
||||
tt := c.srv.fsm.TimeTable()
|
||||
cutoff := time.Now().UTC().Add(-1 * c.srv.config.CSIPluginGCThreshold)
|
||||
oldThreshold = tt.NearestIndex(cutoff)
|
||||
c.logger.Debug("CSI plugin GC scanning before cutoff index",
|
||||
"index", oldThreshold, "csi_plugin_gc_threshold", c.srv.config.CSIPluginGCThreshold)
|
||||
}
|
||||
|
||||
c.logger.Debug("CSI plugin GC scanning before cutoff index",
|
||||
"index", oldThreshold, "csi_plugin_gc_threshold", c.srv.config.CSIPluginGCThreshold)
|
||||
|
||||
for i := iter.Next(); i != nil; i = iter.Next() {
|
||||
plugin := i.(*structs.CSIPlugin)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user