Skip to content

Commit

Permalink
Log maintenance bug fix in the Flow Aggregator (#2522)
Browse files Browse the repository at this point in the history
Periodic deletion of log files is missing in the Flow Aggreegator.
This logic periodically deletes extra files by making sure that max
number of files to be 4. This will ensure that no disk space is wasted
on the Kubernetes node running the Flow Aggregator.

This logic was missed initially when the logging in the Flow Aggregator is
added in the beginning adopting the same framework as the Antrea Agent and the
Antrea Controller.

Signed-off-by: Srikar Tati <stati@vmware.com>
  • Loading branch information
srikartati authored Aug 2, 2021
1 parent e5c06dc commit 2c80f57
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/flow-aggregator/flow-aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (

"antrea.io/antrea/pkg/clusteridentity"
aggregator "antrea.io/antrea/pkg/flowaggregator"
"antrea.io/antrea/pkg/log"
"antrea.io/antrea/pkg/signals"
)

Expand Down Expand Up @@ -77,6 +78,8 @@ func run(o *Options) error {
// exits, we will force exit.
stopCh := signals.RegisterSignalHandlers()

log.StartLogFileNumberMonitor(stopCh)

k8sClient, err := createK8sClient()
if err != nil {
return fmt.Errorf("error when creating K8s client: %v", err)
Expand Down

0 comments on commit 2c80f57

Please sign in to comment.