From c9d5e20923b351d54000b39a0e7b8f2487a8b603 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Tue, 18 Apr 2023 12:33:15 +0800 Subject: [PATCH] [image_config] add rasdaemon.timer (#14300) (#14692) --- files/build_templates/sonic_debian_extension.j2 | 5 +++++ files/image_config/rasdaemon/rasdaemon.timer | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 files/image_config/rasdaemon/rasdaemon.timer diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 31ef1f7b75..c4a0cf0e1f 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -430,6 +430,11 @@ sudo cp $IMAGE_CONFIGS/corefile_uploader/core_uploader.py $FILESYSTEM_ROOT/usr/b sudo cp $IMAGE_CONFIGS/corefile_uploader/core_analyzer.rc.json $FILESYSTEM_ROOT_ETC_SONIC/ sudo chmod og-rw $FILESYSTEM_ROOT_ETC_SONIC/core_analyzer.rc.json +# Rasdaemon service configuration. Use timer to start rasdaemon with a delay for better fast/warm boot performance +sudo cp $IMAGE_CONFIGS/rasdaemon/rasdaemon.timer $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT systemctl disable rasdaemon.service +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT systemctl enable rasdaemon.timer + sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install libffi-dev libssl-dev if [[ $CONFIGURED_ARCH == armhf ]]; then diff --git a/files/image_config/rasdaemon/rasdaemon.timer b/files/image_config/rasdaemon/rasdaemon.timer new file mode 100644 index 0000000000..82e07912d6 --- /dev/null +++ b/files/image_config/rasdaemon/rasdaemon.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Delays rasdaemon until SONiC has started + +[Timer] +OnUnitActiveSec=0 sec +OnBootSec=1min 30 sec +Unit=rasdaemon.service + +[Install] +WantedBy=multi-user.target