Skip to content

Commit

Permalink
Fixing hardlink rule
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Schendel <[email protected]>
  • Loading branch information
amitschendel committed Jun 4, 2024
1 parent b5601d3 commit b7a2e89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions pkg/containerwatcher/v1/container_watcher_private.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ func (ch *IGContainerWatcher) startTracers() error {
logger.L().Error("error starting symlink tracing", helpers.Error(err))
return err
}

if err := ch.startHardlinkTracing(); err != nil {
logger.L().Error("error starting hardlink tracing", helpers.Error(err))
return err
}
}

return nil
Expand Down Expand Up @@ -318,6 +323,12 @@ func (ch *IGContainerWatcher) stopTracers() error {
logger.L().Error("error stopping symlink tracing", helpers.Error(err))
errs = errors.Join(errs, err)
}

// Stop hardlink tracer
if err := ch.stopHardlinkTracing(); err != nil {
logger.L().Error("error stopping hardlink tracing", helpers.Error(err))
errs = errors.Join(errs, err)
}
}

return errs
Expand Down
4 changes: 2 additions & 2 deletions pkg/containerwatcher/v1/hardlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func (ch *IGContainerWatcher) startHardlinkTracing() error {
}

go func() {
for event := range ch.symlinkWorkerChan {
ch.symlinkWorkerPool.Invoke(*event)
for event := range ch.hardlinkWorkerChan {
ch.hardlinkWorkerPool.Invoke(*event)
}
}()

Expand Down

0 comments on commit b7a2e89

Please sign in to comment.