From 66ca6d33c7004cd97ce3a8e9b96634e725a1ae5c Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Tue, 14 Sep 2021 07:57:43 -0700 Subject: [PATCH] Revert "Revert "[hostcfgd] Delay hostcfgd and aaastatsd for faster boot time (#7965)" (#8705)" (#8724) This reverts commit f4dea87cf97a78bd200a092da2193553c13a0494. --- .../debian/sonic-host-services-data.aaastatsd.service | 3 --- .../debian/sonic-host-services-data.aaastatsd.timer | 11 +++++++++++ .../debian/sonic-host-services-data.hostcfgd.service | 3 --- .../debian/sonic-host-services-data.hostcfgd.timer | 11 +++++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer create mode 100644 src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service index b03c6a9551c0..b93fe92c04ed 100644 --- a/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service @@ -12,6 +12,3 @@ Restart=on-failure RestartSec=10 TimeoutStopSec=3 -[Install] -WantedBy=sonic.target - diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer new file mode 100644 index 000000000000..e0458ff326f5 --- /dev/null +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Delays aaastatsd daemon until SONiC has started +PartOf=aaastatsd.service + +[Timer] +OnActiveSec=1min 30 sec +Unit=aaastatsd.service + +[Install] +WantedBy=timers.target sonic.target + diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service index 4adf2aba77ad..5e2434527124 100644 --- a/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service @@ -9,6 +9,3 @@ After=sonic.target Type=simple ExecStart=/usr/local/bin/hostcfgd -[Install] -WantedBy=sonic.target - diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer new file mode 100644 index 000000000000..baf80f4b4cbd --- /dev/null +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Delays hostcfgd daemon until SONiC has started +PartOf=hostcfgd.service + +[Timer] +OnActiveSec=1min 30 sec +Unit=hostcfgd.service + +[Install] +WantedBy=timers.target sonic.target +