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

Add delay time for service restart #31

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Add delay time for service restart #31

merged 1 commit into from
Jan 14, 2025

Conversation

schaefi
Copy link
Collaborator

@schaefi schaefi commented Sep 16, 2024

When cgyle starts the intermediate container to do the job and something fails, then cgyle exits with an exit code != 0. At the same time but disconnected from the cgyle process controlled by systemd the podman command running in the background ends and cleans up its resources. I can imagine that systemd tries to immediately start a new cgyle process while the podman cleanup of the former is not yet complete. A second run of the container on the same network port leads to conflict. This commit adds a restart delay to prevent this condition

@schaefi schaefi requested a review from zelig8 September 16, 2024 16:49
@schaefi schaefi self-assigned this Sep 16, 2024
Copy link

@zelig8 zelig8 left a comment

Choose a reason for hiding this comment

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

LGTM

When cgyle starts the intermediate container to do the job and
something fails, then cgyle exits with an exit code != 0. At the same
time but disconnected from the cgyle process controlled by systemd
the podman command running in the background ends and cleans up its
resources. I can imagine that systemd tries to immediately start a
new cgyle process while the podman cleanup of the former is not yet
complete. A second run of the container on the same network port
leads to conflict. This commit adds a restart delay to prevent
this condition
@schaefi schaefi merged commit 376be6b into main Jan 14, 2025
3 checks passed
@schaefi schaefi deleted the delay_restart branch January 14, 2025 15:37
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