Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move log collector creation logic #1870

Merged
merged 5 commits into from
Nov 30, 2023
Merged

fix: move log collector creation logic #1870

merged 5 commits into from
Nov 30, 2023

Conversation

tedim52
Copy link
Contributor

@tedim52 tedim52 commented Nov 29, 2023

Description:

Fixes: #1833

The resource leak was being caused by a state where if a failure occurred while creating an enclave (eg. ctrl+C while running kurtosis enclave add) at a point where the log collector container was created BEFORE it had been connected to the network AND before the necessary defer undos to clean up the log collector had been queued THEN the network would get cleaned up by the defer undo from CreateNetwork, but the log collector container would remain.

Any attempt to do a kurtosis clean -a would fail to clean log collector container because the network(and thus enclave) the container was created for had already been cleaned up.

After digging - I realized the log collector was being created in container-engine-lib as opposed to in the engine Moving the logic to the engine AFTER the enclave is created fixes the issue. If there is an error at ANY point in the creation of the log collector container (even if the log collectors defer undo hasn't been queued), the defer undo from the CreateEnclave call will clean the log collector because it has a label with the enclaveUUID.

Is this change user facing?

NO

References:

#1833

@tedim52 tedim52 changed the title fix: move where logs collector is created fix: move logs collector creation Nov 29, 2023
@tedim52 tedim52 changed the title fix: move logs collector creation fix: move log collector creation logic Nov 30, 2023
@tedim52 tedim52 added this pull request to the merge queue Nov 30, 2023
Merged via the queue into main with commit b695e27 Nov 30, 2023
33 checks passed
@tedim52 tedim52 deleted the tedi/context branch November 30, 2023 18:02
github-merge-queue bot pushed a commit that referenced this pull request Dec 1, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.85.39](0.85.38...0.85.39)
(2023-11-30)


### Features

* emui package details page
([#1873](#1873))
([e2b75b2](e2b75b2))
* User service ports Traefik Docker labels
([#1871](#1871))
([d18f20e](d18f20e))


### Bug Fixes

* move log collector creation logic
([#1870](#1870))
([b695e27](b695e27))
* service name collision error message
([#1863](#1863))
([164b316](164b316))
* Update custom Nix dev deps to work on also linux
([#1862](#1862))
([d11cd37](d11cd37))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource-leaked logs-collector-XXXX containers
2 participants