Skip to content

Commit

Permalink
[202211_1_26] Fix issue: set has_timer attribute to true for platform…
Browse files Browse the repository at this point in the history
… monitor service
  • Loading branch information
keboliu committed Jul 13, 2023
1 parent a99822e commit 463d947
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
("database", "always_enabled", false, "always_enabled"),
("lldp", "enabled", true, "enabled"),
("pmon", "enabled", true, "enabled"),
("pmon", "enabled", false, "enabled"),
("snmp", "enabled", true, "enabled"),
("eventd", "enabled", false, "enabled"),
("swss", "enabled", false, "enabled"),
Expand Down
12 changes: 12 additions & 0 deletions files/build_templates/pmon.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
# This delay is for fast/warm reboot performance
Description=Delays pmon docker until SONiC has started
PartOf=pmon.service

[Timer]
OnUnitActiveSec=0 sec
OnBootSec=1min 30 sec
Unit=pmon.service

[Install]
WantedBy=timers.target sonic.target sonic-delayed.target
3 changes: 3 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,9 @@ sudo LANG=C cp $SCRIPTS_DIR/write_standby.py $FILESYSTEM_ROOT/usr/local/bin/writ
# Copy mark_dhcp_packet script
sudo LANG=C cp $SCRIPTS_DIR/mark_dhcp_packet.py $FILESYSTEM_ROOT/usr/local/bin/mark_dhcp_packet.py

sudo cp $BUILD_TEMPLATES/pmon.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
echo "pmon.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

Expand Down

0 comments on commit 463d947

Please sign in to comment.