sonic-buildimage/files/build_templates
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
..
bgp.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
database.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
dhcp_relay.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
docker_image_ctl.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
lldp.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
pmon.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
snmp.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
sonic_debian_extension.j2 [cfggen] Add tool to translate openconfig acl into sonic format (#388) 2017-03-17 14:51:42 -07:00
sonic_version.yml.j2 [device]: add missing sai profile and minigraph for the supported devices (#362) 2017-03-02 23:53:20 -08:00
swss.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00
teamd.service.j2 [oneimage]: Fix race condition in systemd container services (#421) 2017-03-22 13:26:00 -07:00