Commit Graph

9 Commits

Author SHA1 Message Date
Joe LeVeque
ecec579933 [services] Services which start containers now use 'docker wait' instead of 'docker attach' (#2661) 2019-03-19 03:05:37 +00:00
Joe LeVeque
298d2ad8f4
[boot] Refactor: All services which start Docker containers start before ntp-config service (#2335) 2018-12-03 16:01:44 -08:00
Taoyu Li
e84e093dea
Move all minigraph-related action from rc.local to updategraph (#1452)
- Move all minigraph-related action from rc.local to updategraph
- updategraph service is now after database. All feature services are now after and depending on updategraph
2018-03-09 17:17:08 -08:00
Ying Xie
673c82f9a3
[dhcp_relay] complete the dhcp_relay service dependency towards teamd (#1356)
This change makes sure that the dhcp_relay service will be started
after teamd service is started from a stopped state.
2018-01-30 17:30:38 -08:00
Ying Xie
474b3f08e7
[dhcp_relay] make dhcp_relay service depends on teamd as well (#1348)
When teamd service restarted, the port channels will be recreated.

Dhcp relay service needs to be restarted after that to listen on the
right port channels.
2018-01-29 16:26:54 -08:00
Joe LeVeque
e0d22acc9e [DHCP Relay]: Wait for all interfaces to come up before starting DHCP relay (#660) 2017-06-01 18:38:33 -07:00
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
Joe LeVeque
d6bfa505b3 Wait for VLAN interface to come up before starting DHCP relay (#399) 2017-03-16 10:40:33 -07:00
Joe LeVeque
e75acfe6d7 Add 'One Image' implementation for DHCP relay (hopefully fix builds) 2017-02-04 19:42:41 +00:00