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

two starts of one service in parallel #24

Closed
gdraheim opened this issue Apr 21, 2018 · 1 comment
Closed

two starts of one service in parallel #24

gdraheim opened this issue Apr 21, 2018 · 1 comment
Milestone

Comments

@gdraheim
Copy link
Owner

In one particular situation there is a collabnet.service that wants to run more "systemctl start" routines on other services. Upon a container start, both the collabnet.service and the other services are run by PID 1 as they are all enabled. As a result there may be two processes of the same service being run parallel to startup.

Now this situation has some obvious problems attached to it. Not even about possibly destroying data, but I noticed it first by having PIDFile knowing only the last process that has started, so a shutdown of the processes will not be complete when the container needs to shut down. A "systemctl halt" will leave some processes running. And that's a general problem with other circumenstances where a "start" call is issused in parallel from different sides.

@gdraheim
Copy link
Owner Author

Using lock files for each service does only solve the problem partially - one has to check that an active service is not followed by another start sequence, and that can also happen if a service is run as type=forking where it takes some time till the actual program is up.

In the real world it did help to make the collabnet.service start to be much more stable.

@gdraheim gdraheim added this to the M1.2 milestone Apr 21, 2018
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

No branches or pull requests

1 participant