[mellanox]: Fixed config reload race. (#2930)

Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
This commit is contained in:
Nazarii Hnydyn 2019-05-29 09:57:29 +03:00 committed by liat-grozovik
parent 89ee636b99
commit e041b15d10

View File

@ -101,8 +101,13 @@ start() {
fi fi
if [[ x"$WARM_BOOT" != x"true" ]]; then if [[ x"$WARM_BOOT" != x"true" ]]; then
/bin/systemctl stop pmon if [[ x"$(/bin/systemctl is-active pmon)" == x"active" ]]; then
/usr/bin/hw-management.sh chipdown /bin/systemctl stop pmon
/usr/bin/hw-management.sh chipdown
/bin/systemctl restart pmon
else
/usr/bin/hw-management.sh chipdown
fi
fi fi
if [[ x"$BOOT_TYPE" == x"fast" ]]; then if [[ x"$BOOT_TYPE" == x"fast" ]]; then
@ -112,10 +117,6 @@ start() {
/usr/bin/mst start /usr/bin/mst start
/usr/bin/mlnx-fw-upgrade.sh /usr/bin/mlnx-fw-upgrade.sh
/etc/init.d/sxdkernel start /etc/init.d/sxdkernel start
if [[ x"$WARM_BOOT" != x"true" ]]; then
/bin/systemctl start pmon
fi
fi fi
if [[ x"$WARM_BOOT" != x"true" ]]; then if [[ x"$WARM_BOOT" != x"true" ]]; then
@ -128,10 +129,6 @@ start() {
/usr/bin/${SERVICE}.sh start /usr/bin/${SERVICE}.sh start
debug "Started ${SERVICE} service..." debug "Started ${SERVICE} service..."
if [[ x"$sonic_asic_platform" == x"mellanox" && x"$BOOT_TYPE" == x"fast" ]]; then
/usr/bin/hw-management.sh chipupen
fi
unlock_service_state_change unlock_service_state_change
} }