Skip to content

Commit

Permalink
[reboot cause]: Delay process-reboot-cause service until network conn…
Browse files Browse the repository at this point in the history
…ection is stable (#4003)
  • Loading branch information
sujinmkang authored and yxieca committed Jan 11, 2020
1 parent 27a2e06 commit 956b8fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions files/build_templates/process-reboot-cause.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Delays process-reboot-cause until network is stably connected

[Timer]
OnBootSec=1min 30 sec
Unit=process-reboot-cause.service

[Install]
WantedBy=timers.target
5 changes: 5 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd.service $FILESYSTEM_ROOT/etc/systemd/s
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable caclmgrd.service
sudo cp $IMAGE_CONFIGS/caclmgrd/caclmgrd $FILESYSTEM_ROOT/usr/bin/

# Copy systemd timer configuration
# It implements delayed start of services
sudo cp $BUILD_TEMPLATES/process-reboot-cause.timer $FILESYSTEM_ROOT/etc/systemd/system/
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable process-reboot-cause.timer

# Copy process-reboot-cause service files
sudo cp $IMAGE_CONFIGS/process-reboot-cause/process-reboot-cause.service $FILESYSTEM_ROOT/etc/systemd/system/
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable process-reboot-cause.service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ After=rc-local.service
[Service]
Type=simple
ExecStart=/usr/bin/process-reboot-cause

[Install]
WantedBy=multi-user.target

0 comments on commit 956b8fd

Please sign in to comment.