Grouping delayed services under a target for config reload checks (#7846)

#### Why I did it
Create a target for delayed service timers. Few services in sonic have delayed to speed up the bring up of the system and essential services. However there is no way to track when they start. This will be a problem when executing config reload as config reload expects all services to be up. Hence grouped all the timers that trigger the delayed services under one target so that they could be tracked in 'config reload' command

#### How I did it
Created delay.target service and add created dependency on the delayed targets.
This commit is contained in:
Sudharsan Dhamal Gopalarathnam 2021-06-21 11:55:02 -07:00 committed by GitHub
parent 95c67d2d55
commit c88c3c7ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 3 deletions

View File

@ -8,4 +8,4 @@ OnBootSec=3min 30 sec
Unit=mgmt-framework.service
[Install]
WantedBy=timers.target sonic.target
WantedBy=timers.target sonic.target sonic-delayed.target

View File

@ -9,4 +9,4 @@ OnBootSec=3min 30 sec
Unit=snmp.service
[Install]
WantedBy=timers.target swss.service
WantedBy=timers.target swss.service sonic-delayed.target

View File

@ -0,0 +1,5 @@
[Unit]
Description=SONiC delayed services target.
[Install]
WantedBy=multi-user.target

View File

@ -766,6 +766,9 @@ echo "mgmt-framework.timer" | sudo tee -a $GENERATED_SERVICE_FILE
sudo cp $BUILD_TEMPLATES/sonic.target $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable sonic.target
sudo cp $BUILD_TEMPLATES/sonic-delayed.target $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable sonic-delayed.target
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python-dev python3-dev
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y build-essential libssl-dev swig
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y libcairo2-dev libdbus-1-dev libgirepository1.0-dev libsystemd-dev pkg-config

View File

@ -8,4 +8,4 @@ OnBootSec=3min 30 sec
Unit=telemetry.service
[Install]
WantedBy=timers.target sonic.target
WantedBy=timers.target sonic.target sonic-delayed.target