-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
bgp container not started due to database #390
Comments
can be reproduced. |
Mar 21 20:42:50 str-s6000-on-2 INFO systemd[1]: Starting Database container... The reason seems to be that systemd is not blocked correctly by database.sh script, and database service is considered started immediately after calling the script. Will make deeper investigation for the root cause. |
Please refer to description of PR#421 for detail information. |
When Type=simple, systemd will consider the service activated immediately after specified in ExecStart process is started. If there is downstream service depending on the state prepared in ExecStart, there will be race condition. For example, issue #390. In this case, database.service calls database.sh, which calls docker run or docker start -a to start database container. However, systemd considers database.service successfully started at the time database.sh begins, not after docker run finishes. As database.service is consider started, bgp.service can be started. The redis database, which bgp service depends on, might or might not have been started at this time point. To fix this issue (and still keeping the functionality to monitor docker status with systemd), we split the ExecStart process into an ExecStartPre part and an ExecStart part. docker run is splitted into docker run -d then docker attach , while docker start -a is splitted into docker start and then docker attach. In this way, we make sure the downstream services are blocked until container is successfully started.
Thanks! |
…#390) * [mlnx|ffb] Add fast-fast flow in fast(warm)-reboot script Signed-off-by: Stepan Blyschak <[email protected]> * [Mellanox|FFB]: Fix review comments * Change naming convention from "fast-fast" to "fastfast" Signed-off-by: Volodymyr Samotiy <[email protected]>
- Pick up SAI switch attribute SAI_SWITCH_ATTR_PRE_SHUTDOWN definition Signed-off-by: Ying Xie <[email protected]>
… automatically (sonic-net#16106) #### Why I did it src/sonic-platform-common ``` * ab70e66 - (HEAD -> master, origin/master, origin/HEAD) Add new SSD type support (sonic-net#390) (21 hours ago) [Junchao-Mellanox] ``` #### How I did it #### How to verify it #### Description for the changelog
The text was updated successfully, but these errors were encountered: