sonic-buildimage/files
Taoyu Li 42ae02b665 [oneimage]: Fix race condition in systemd container services (#421)
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.
2017-03-22 13:26:00 -07:00
..
Aboot [boot0] sync filesystem before kexec (#301) 2017-02-16 22:10:29 -08:00
apt Config apt inside docker images to save disk space: auto clean, gz, no trans (#69) 2016-11-16 12:46:15 -08:00
build_templates [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
dhcp Add get_graph service to fetch minigraph automatically (#288) 2017-02-17 13:47:01 -08:00
docker Squash merge latest code to github branch 2016-07-26 12:01:58 -07:00
image_config [interfaces]: Remove bridge-utils from swss docker and add it to base image (#417) 2017-03-20 21:39:09 -07:00
initramfs-tools [installer]: limit size of /var/log (#284) 2017-02-16 23:28:09 -08:00
sshd Squash merge latest code to github branch 2016-07-26 12:01:58 -07:00