Repository navigation
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cvas22 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
|
Welcome @cvas22! It looks like this is your first PR to falcosecurity/plugins 🎉 |
Fixes: falcosecurity#1603 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
cvas22
force-pushed
the
fix/1603-docker-events-resubscribe
branch
from
November 6, 2026 18:53
2c8d6e3 to
46c8d70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area plugins
What this PR does / why we need it:
dockerEngine.Listensubscribes to the events API once and ignores the error channel. The docker client reports a broken stream on that channel and then stops, without closing the messages channel. After a dockerd restart the plugin therefore never sees another create, start or destroy event, and containers created afterwards have no name or image on their first events.The listener now also waits on the error channel, and when the stream ends while the context is alive it resubscribes after a backoff that starts at one second and doubles up to thirty, reusing the bounds and
resubscribeWaitfrom the CRI fix in #1502. A closed messages channel is treated the same way.This does not re-list running containers after a reconnect, so a container created while the daemon was down is not picked up. As in #1502, I left that out because it needs a call on replaying containers the plugin may already know about.
Which issue(s) this PR fixes:
Fixes #1603
Notes:
TestDockerListenerResubscribesAfterStreamEndsruns the realListenagainst a fake daemon whose first event stream ends with no events and whose second serves a create event. It fails without the change (timed out waiting for the event) and passes with it. I ran it withgo test -tags containers_image_openpgp,exclude_graphdriver_btrfs,btrfs_noversion,exclude_graphdriver_devicemapper ./pkg/container -run 'TestDockerListenerResubscribes|ListenerShutdown'in a Linux container.TestDockerneeds a live Docker daemon and was not run.Does this PR introduce a user-facing change?: