endpoint/ebpf: implement stop

Since d60874aca8 `connectionTracker` can
fallback when the `EbpfTracker` died. Hence we only have to stop the
`tracer` in `stop()`.

This commit is also a fixup for d60874aca8
where we do a gentle fallback but never actually stop the tracer to stop
polling.
This commit is contained in:
Michael Schubert
2017-03-21 13:57:20 +01:00
parent 2a61656b03
commit cd25b8b935

View File

@@ -209,15 +209,8 @@ func (t *EbpfTracker) isDead() bool {
}
func (t *EbpfTracker) stop() {
// TODO: implement proper stopping logic
//
// Even if we stop the go routine, it's not enough since we disabled the
// async proc parser. We leave this uninmplemented for now because:
//
// * Ebpf parsing is optional (need to be enabled explicitly with
// --probe.ebpf.connections=true), if a user enables it we assume they
// check on the logs whether it works or not
//
// * It's unlikely that the ebpf tracker stops working if it started
// successfully and if it does, we probaby want it to fail hard
if t.tracer != nil {
t.tracer.Stop()
}
t.dead = true
}