Skip to content

Commit

Permalink
[boot] Refactor: All services which start Docker containers start bef…
Browse files Browse the repository at this point in the history
…ore ntp-config service (sonic-net#2335)
  • Loading branch information
jleveque authored Dec 4, 2018
1 parent d608a83 commit 298d2ad
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions files/build_templates/bgp.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=BGP container
Requires=updategraph.service
After=updategraph.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/dhcp_relay.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=DHCP relay container
Requires=updategraph.service swss.service teamd.service
After=updategraph.service swss.service teamd.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/lldp.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=LLDP container
Requires=updategraph.service
After=updategraph.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/pmon.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=Platform monitor container
Requires=updategraph.service
After=updategraph.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/radv.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=Router advertiser container
Requires=updategraph.service swss.service
After=updategraph.service swss.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/snmp.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=SNMP container
Requires=updategraph.service swss.service
After=updategraph.service swss.service
Before=ntp-config.service

[Service]
ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/swss.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Requires=nps-modules-4.9.0-7-amd64.service
{% endif %}
After=database.service updategraph.service
After=interfaces-config.service
Before=ntp-config.service

[Service]
User=root
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/syncd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ After=opennsl-modules-4.9.0-7-amd64.service
{% elif sonic_asic_platform == 'nephos' %}
After=nps-modules-4.9.0-7-amd64.service
{% endif %}
Before=ntp-config.service

[Service]
User=root
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/teamd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=TEAMD container
Requires=updategraph.service
After=updategraph.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/telemetry.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Description=Telemetry container
Requires=swss.service
After=swss.service
Before=ntp-config.service

[Service]
User={{ sonicadmin_user }}
Expand Down
2 changes: 1 addition & 1 deletion files/image_config/ntp/ntp-config.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Update NTP configuration
Requires=updategraph.service
After=updategraph.service bgp.service dhcp_relay.service lldp.service pmon.service radv.service snmp.service swss.service syncd.service teamd.service
After=updategraph.service

[Service]
Type=oneshot
Expand Down

0 comments on commit 298d2ad

Please sign in to comment.