forked from falcosecurity/libs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add container engine fix back (falcosecurity#128)
* Revert "Revert "Merge upstream pr 688 (falcosecurity#121)" (falcosecurity#122)" This reverts commit c8dbbf3. This adds the fix back. I'll test with an agent PR that updates/removes the tests. * Add the ability to "defer" an async lookup In some cases, the "server" code running run_impl might want to retry its work until later. The current version can't do that--once a key is dequeued using deque_next_key, it has to call store_value or lose the request. To make retries easier, add a method defer_lookup that pushes the key (and optional value) back onto the request queue with a configurable delay. After delay, the key will be pulled again with a call to dequeue_next_key(). Signed-off-by: Mark Stemm <[email protected]> * Use defer_lookup for container info retry instead of lookup_delayed When the container async lookup class wants to retry a lookup, the current version tries to use lookup_delayed to initiate a new request. It turns out that that doesn't work--if there's already an existing request in m_value_map, it assumes that the "server" doing run_impl will eventually return an answer, and doesn't add a request to the queue. The solution is to use the newly added lookup_delayed instead, which pushes the request back onto the queue with a short delay. Signed-off-by: Mark Stemm <[email protected]> * Use a separate max_wait_ms instead of re-using s_cri_timeout Now that timeouts are working, it may take several seconds for subsequent retries to complete. However, s_cri_timeout (typically 1 second) was being used for the max_wait_ms in cri_async_source. That would mean that a lookup would expire before the server side had retried the lookup. The solution is to use a separate 10 second max_wait_ms, which matches docker. Signed-off-by: Mark Stemm <[email protected]> Signed-off-by: Mark Stemm <[email protected]>
- Loading branch information
Showing
7 changed files
with
102 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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