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

@ailispaw
Copy link
Contributor

@ailispaw ailispaw commented Jan 14, 2016

https://github.com/Yelp/dumb-init

@ixkaito
Copy link
Member

@ixkaito ixkaito commented Jan 18, 2016

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

@ailispaw
Copy link
Contributor Author

@ailispaw ailispaw commented Jan 18, 2016

I will rebase it later.

@ailispaw
Copy link
Contributor Author

@ailispaw ailispaw commented Jan 18, 2016

Rebased.

ixkaito added a commit that referenced this issue Jan 18, 2016
Add dumb-init to shutdown a container gracefully
@ixkaito ixkaito merged commit ca29d42 into wckr:master Jan 18, 2016
@ixkaito
Copy link
Member

@ixkaito ixkaito commented Jan 18, 2016

Many thanks!

@ailispaw ailispaw deleted the dumb-init branch Jan 18, 2016
@ailispaw
Copy link
Contributor Author

@ailispaw ailispaw 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
Copy link
Member

@ixkaito ixkaito 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
Copy link
Contributor Author

@ailispaw ailispaw 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 issue Mar 17, 2016
ixkaito added a commit to wckr/wordpress-dockerfile that referenced this issue Mar 17, 2016
@ixkaito
Copy link
Member

@ixkaito ixkaito 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
Copy link
Contributor Author

@ailispaw ailispaw commented Mar 17, 2016

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants