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 container restart issue #4912

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Fix container restart issue #4912

merged 2 commits into from
Dec 18, 2024

Conversation

fmarco76
Copy link
Member

When container are restarted with podman the reestart will send the TERM signal to the entry process. Since the main entry for these container is a script running other script and waiting the singal are not propagated to the thread group making the restart hanging until a KILL signal is used but these return with an error code making the automation failing.

@fmarco76 fmarco76 marked this pull request as draft December 17, 2024 10:51
@fmarco76 fmarco76 force-pushed the containers branch 10 times, most recently from 835c2b0 to 5199563 Compare December 18, 2024 10:04
@fmarco76 fmarco76 closed this Dec 18, 2024
@fmarco76 fmarco76 reopened this Dec 18, 2024
When container are restarted with podman the restart will send the TERM
signal to the entry process. Since the main entry for these container is
a script running other script and waiting the signal are not propagated
to the thread group making the restart hanging until a KILL signal is
used but these return with an error code making the automation failing.
When a podman container restarts the network interface does not always
get updated correctly, making the following communications with the container
fail.

Reload the network solve the problems when it is present.
@fmarco76 fmarco76 marked this pull request as ready for review December 18, 2024 14:38
@fmarco76 fmarco76 requested a review from edewata December 18, 2024 14:38
@fmarco76
Copy link
Member Author

The remaining errors in container related to podman deployment inside docker are not reproducible in local machine and run correctly in action started from forked repository. This is an example with the same code in this PR:

https://github.com/fmarco76/pki/actions/runs/12394479652

These will be fixed in separate PR.

Copy link
Contributor

@edewata edewata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! We can merge this, but does it mean we need to do this whenever we restart a container?

docker restart ca
sleep 10
docker network reload --all

I wonder if this is caused by a recent change in Docker/Podman or something else.

@fmarco76
Copy link
Member Author

Nice! We can merge this, but does it mean we need to do this whenever we restart a container?

docker restart ca
sleep 10
docker network reload --all

I wonder if this is caused by a recent change in Docker/Podman or something else.

Not sure the reason. Running local (and I did also some test in the actions adding the -v to curl) I get no route to host from client to ca. Reloading the interfaces solve the issue. I did not find other solutions to solve this problem and not sure if it is related to the special setup we are using requiring some additional flag. I would consider this as a temporary solution for the moment. We can investigate while resolving the other container issues.

@fmarco76
Copy link
Member Author

@edewata Thanks!

@fmarco76 fmarco76 merged commit b13594e into dogtagpki:master Dec 18, 2024
161 of 171 checks passed
@fmarco76 fmarco76 deleted the containers branch December 19, 2024 09:09
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.

2 participants