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:
parent
95c67d2d55
commit
c88c3c7ba5
@ -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
|
||||
|
@ -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
|
||||
|
5
files/build_templates/sonic-delayed.target
Normal file
5
files/build_templates/sonic-delayed.target
Normal file
@ -0,0 +1,5 @@
|
||||
[Unit]
|
||||
Description=SONiC delayed services target.
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user