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

backport #1426 to 0.6 #1427

Merged
merged 2 commits into from
Jun 25, 2020
Merged

backport #1426 to 0.6 #1427

merged 2 commits into from
Jun 25, 2020

Conversation

vankoven
Copy link
Contributor

No description provided.

vankoven added 2 commits June 25, 2020 19:59
When the Tempesta is started using systemd daemon, service management
in tempesta.sh conflicts with systemd unit management. This happens
because `flock` daemonizes and immediately exits. Systemd unit was
configured to run `oneshot` command thus tempesta-fw.service immediately
switches  to state `started`. It's highly likely that Tempesta is
not started by that moment.

Situation may became worse if concurrent start and stop happens:
flock process may be killed and lock file may become forever locked.

To fix all the issues:
- don't manage concurrent starts manually, it's systemd job
- use  ExecStopPost instead of ExecStop to call stop functions even on
unclean start
- set TimeoutSec to handle cases with really long commands processings,
i.e. reconfiguration under heavy load.
Copy link
Contributor

@krizhanovsky krizhanovsky left a comment

Choose a reason for hiding this comment

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

LGTM

@vankoven vankoven merged commit 937b69c into release-0.6 Jun 25, 2020
@vankoven vankoven deleted the ik-fix-systemd-start-issues-0.6 branch June 25, 2020 18:27
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