Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Delay hw-mgmt service starting #179

Merged
merged 3 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions device/mellanox/x86_64-mlnx_msn2700-r0/platform_wait
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ function wait_for_sfp() {

log_info "Wait for SFP interfaces to be ready"

wait_for_sfp
EXIT_CODE="$?"
#wait_for_sfp
#EXIT_CODE="$?"
EXIT_CODE="${EXIT_SUCCESS}"
if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
log_error "SFP interfaces are not ready: timeout"
exit "${EXIT_CODE}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 1d0c7ba641dcd293c1f986652108d719d8d68d69 Mon Sep 17 00:00:00 2001
From: Kebo Liu <kebol@nvidia.com>
Date: Tue, 6 Jun 2023 15:25:39 +0800
Subject: [PATCH] Add extra delay to hw-management service start

Signed-off-by: Kebo Liu <kebol@nvidia.com>
---
debian/hw-management.hw-management.service | 1 +
1 file changed, 1 insertion(+)

diff --git a/debian/hw-management.hw-management.service b/debian/hw-management.hw-management.service
index 639bd3c..e5b5679 100755
--- a/debian/hw-management.hw-management.service
+++ b/debian/hw-management.hw-management.service
@@ -6,6 +6,7 @@ Before=determine-reboot-cause.service system-health.service watchdog-control.ser
[Service]
Type=oneshot
RemainAfterExit=true
+ExecStartPre=-/bin/sleep 60
ExecStartPre=-/bin/sh -c "/usr/bin/hw-management-ready.sh"
ExecStart=/bin/sh -c "/usr/bin/hw-management.sh start"
ExecStop=/bin/sh -c "/usr/bin/hw-management.sh stop"
--
1.9.1