Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[syncd.sh,pmon.service] Prevent pmon from starting ahead of syncd #8

Merged
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
3 changes: 3 additions & 0 deletions files/build_templates/pmon.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Description=Platform monitor container
Requires=updategraph.service
After=updategraph.service
{% if sonic_asic_platform == 'mellanox' %}
After=syncd.service
{% endif %}
Before=ntp-config.service

[Service]
Expand Down
9 changes: 5 additions & 4 deletions files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ start() {
/usr/bin/hw-management.sh chipdown
fi

debug "Starting pmon service..."
/bin/systemctl start pmon
debug "Started pmon service"

if [[ x"$BOOT_TYPE" == x"fast" ]]; then
/usr/bin/hw-management.sh chipupdis
fi
Expand All @@ -136,6 +132,11 @@ start() {
}

wait() {
if [[ x"$sonic_asic_platform" == x"mellanox" ]]; then
debug "Starting pmon service..."
/bin/systemctl start pmon
debug "Started pmon service"
fi
/usr/bin/${SERVICE}.sh wait
}

Expand Down