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

[reboot] stop docker service before rebooting #423

Merged
merged 2 commits into from
Jan 10, 2019
Merged

Conversation

yxieca
Copy link
Contributor

@yxieca yxieca commented Jan 2, 2019

- What I did
After upgrading to docker-ce 18.09.0. Shutdown SONiC takes 5-10 minutes
waiting for all the running docker containers to quit. They all enventually
hit the timeout and caused the huge delay.

This is a work-around until proper solution is found.

- How to verify it
with the change, reboot takes little time after upgrading to docker-ce 18.09.0. Otherwise the reboot takes about 5-10 minutes on shutdown path.

After upgrading to docker-ce 18.09.0. Shutdown SONiC takes 5-10 minutes
waiting for all the running docker containers to quit. They all enventually
hit the timeout and caused the huge delay.

This is a work-around until proper solution is found.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@zhenggen-xu
Copy link
Collaborator

While we are figuring out the root cause, do you see needs to make any changes in fastboot script after docker upgrade?

BTW: "5-10 seconds" should be "5-10 minutes" in the description. :)

@yxieca
Copy link
Contributor Author

yxieca commented Jan 3, 2019

The fast reboot script is the same base as warm reboot, I suspect it would be fine but some test is needed.

Thanks for noticing the wording error :-)

@yxieca
Copy link
Contributor Author

yxieca commented Jan 3, 2019

Sorry, I guess I didn't answer your question in the way you expected.

fast/warm reboot script already stopped docker service before reboot. So they are fine.

@yxieca
Copy link
Contributor Author

yxieca commented Jan 4, 2019

This change is no longer needed.

@yxieca yxieca closed this Jan 4, 2019
@yxieca yxieca reopened this Jan 4, 2019
@yxieca
Copy link
Contributor Author

yxieca commented Jan 4, 2019

Oops. The reboot issue wasn't fixed by the proper installation of docker engine. This change is still needed for now.

scripts/reboot Outdated Show resolved Hide resolved
- add a protection of 30 seconds timeout.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@lguohan
Copy link
Contributor

lguohan commented Jan 8, 2019

what is the root cause of the 5 to 10 minutes delay?

@yxieca
Copy link
Contributor Author

yxieca commented Jan 8, 2019

The root cause is not clear at the moment. The problem doesn't happen when issuing "docker stop <any container" or "systemctl stop docker". But it is somehow 100% repeatable during regular reboot.

@jipanyang
Copy link
Contributor

jipanyang commented Jan 9, 2019

Is it related to the docker corruption issue: sonic-net/sonic-buildimage#2382?

It looks the docker failure was seen with docker engine 1.11. With 18.09.0, I have not seen the docker hang issue.

@yxieca
Copy link
Contributor Author

yxieca commented Jan 9, 2019

Jipan,

I think this issue is not the same as the issue you referenced.

The issue I am working on, is very particular to shutdown path of reboot. And I didn't see docker corruption afterwards, yet.

Regards,
Ying

@lguohan
Copy link
Contributor

lguohan commented Jan 10, 2019

retest this please

@yxieca yxieca merged commit 220e269 into sonic-net:master Jan 10, 2019
@yxieca yxieca deleted the docker branch January 10, 2019 22:31
yxieca added a commit that referenced this pull request Jan 16, 2019
yxieca added a commit to yxieca/sonic-utilities that referenced this pull request Jan 16, 2019
yxieca added a commit that referenced this pull request Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants