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 dumb-init to shutdown a container gracefully #28

Merged
merged 1 commit into from Jan 18, 2016

Conversation

Projects
None yet
2 participants
@ailispaw
Copy link
Contributor

commented Jan 14, 2016

@ailispaw ailispaw force-pushed the ailispaw:dumb-init branch from 5b48a3d to 9001de2 Jan 14, 2016

@ixkaito

This comment has been minimized.

Copy link
Member

commented Jan 18, 2016

I merged your previous pull request. This seems to have conflicts with it.

@ailispaw

This comment has been minimized.

Copy link
Contributor Author

commented Jan 18, 2016

I will rebase it later.

@ailispaw ailispaw force-pushed the ailispaw:dumb-init branch from 9f250a9 to 75e6845 Jan 18, 2016

@ailispaw

This comment has been minimized.

Copy link
Contributor Author

commented Jan 18, 2016

Rebased.

ixkaito added a commit that referenced this pull request Jan 18, 2016

Merge pull request #28 from ailispaw/dumb-init
Add dumb-init to shutdown a container gracefully

@ixkaito ixkaito merged commit ca29d42 into wckr:master Jan 18, 2016

@ixkaito

This comment has been minimized.

Copy link
Member

commented Jan 18, 2016

Many thanks!

@ailispaw ailispaw deleted the ailispaw:dumb-init branch Jan 18, 2016

@ailispaw

This comment has been minimized.

Copy link
Contributor Author

commented Mar 13, 2016

FYI:
I found the actual problem in mysqld_safe script to stop the wocker container gracefully.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208364#103
There is still an issue in the script (@mysql 5.5.47-0+deb8u1) as same as this report.
We need to patch mysqld_safe to add & wait at the end of the line 146 in it.

146c146
<     file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;;
---
>     file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1 & wait" ;;

I'm not sure this was fixed in the latest mysql-server.

@ixkaito

This comment has been minimized.

Copy link
Member

commented Mar 15, 2016

Thanks.
mysqld_safe now shuts down ignoring all signals, doesn't it?
Could you tell me the details of what kind of problem will occur?

@ailispaw

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2016

Yes, I believe so.
supervisord will kill the subprocess after 10s and exit 0, because of this.
It takes a little longer to stop a container and may break files in the container.

And dumb-init can not take care of this.

ixkaito added a commit to wckr/wocker-dockerfile that referenced this pull request Mar 17, 2016

ixkaito added a commit to wckr/wordpress-dockerfile that referenced this pull request Mar 17, 2016

@ixkaito

This comment has been minimized.

Copy link
Member

commented Mar 17, 2016

Actually, I felt that stopping container takes a little longer than before.
I added a patch, and it works well.

@ailispaw

This comment has been minimized.

Copy link
Contributor Author

commented Mar 17, 2016

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.