Skip to content

Commit

Permalink
Merge pull request #8 from stephenxs/pmon-dependency-syncd-defer-pmon…
Browse files Browse the repository at this point in the history
…-start

[syncd.sh,pmon.service] Prevent pmon from starting ahead of syncd
  • Loading branch information
stephenxs authored Sep 19, 2019
2 parents 226039c + 62509b6 commit d5376e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit d5376e3

Please sign in to comment.