From c118b2a57b264db4417bb5b71f6e5fd5cc91cfd9 Mon Sep 17 00:00:00 2001 From: vadymhlushko-mlnx Date: Fri, 23 Feb 2024 15:10:09 +0200 Subject: [PATCH 1/2] Remove the PMON and XCVRD delay on system boot Signed-off-by: vadymhlushko-mlnx --- .../pmon_daemon_control.json | 2 +- files/build_templates/init_cfg.json.j2 | 2 +- files/scripts/syncd.sh | 15 +++------------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/pmon_daemon_control.json b/device/mellanox/x86_64-mlnx_msn2700-r0/pmon_daemon_control.json index dbc19c9baabf..107e788d4116 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/pmon_daemon_control.json +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/pmon_daemon_control.json @@ -1,7 +1,7 @@ { "skip_ledd": true, "skip_fancontrol": true, - "delay_xcvrd": true, + "delay_xcvrd": false, "skip_xcvrd_cmis_mgr": true } diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index ae382263bb18..1a14adc5e568 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -36,7 +36,7 @@ {%- set features = [("bgp", "{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] or ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['supervisor']) %}disabled{% else %}enabled{% endif %}", false, "enabled"), ("database", "always_enabled", false, "always_enabled"), ("lldp", "enabled", true, "enabled"), - ("pmon", "enabled", true, "enabled"), + ("pmon", "enabled", false, "enabled"), ("snmp", "enabled", true, "enabled"), ("swss", "enabled", false, "enabled"), ("syncd", "enabled", false, "enabled")] %} diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index c6fbf008c6dc..50c183f21ab0 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -96,18 +96,9 @@ function waitplatform() { BOOT_TYPE=`getBootType` if [[ x"$sonic_asic_platform" == x"mellanox" ]]; then - if [[ x"$BOOT_TYPE" = @(x"fast"|x"warm"|x"fastfast") ]]; then - PMON_TIMER_STATUS=$(systemctl is-active pmon.timer) - if [[ x"$PMON_TIMER_STATUS" = x"inactive" ]]; then - systemctl start pmon.timer - else - debug "PMON service is delayed by a timer for better fast/warm boot performance" - fi - else - debug "Starting pmon service..." - /bin/systemctl start pmon - debug "Started pmon service" - fi + debug "Starting pmon service..." + /bin/systemctl start pmon + debug "Started pmon service" fi } From c4007235418bb627ed6a80d63018542ba3a9a2e8 Mon Sep 17 00:00:00 2001 From: vadymhlushko-mlnx Date: Tue, 14 May 2024 14:59:29 +0300 Subject: [PATCH 2/2] Remove waitplatform() from syncd.sh Signed-off-by: vadymhlushko-mlnx --- files/scripts/gbsyncd.sh | 4 ---- files/scripts/syncd.sh | 10 ---------- files/scripts/syncd_common.sh | 3 --- 3 files changed, 17 deletions(-) diff --git a/files/scripts/gbsyncd.sh b/files/scripts/gbsyncd.sh index 34bcb7044bed..e545dad5a470 100755 --- a/files/scripts/gbsyncd.sh +++ b/files/scripts/gbsyncd.sh @@ -15,10 +15,6 @@ function startplatform() { done } -function waitplatform() { - : -} - function stopplatform1() { if ! docker top gbsyncd$DEV | grep -q /usr/bin/syncd; then debug "syncd process in container gbsyncd$DEV is not running" diff --git a/files/scripts/syncd.sh b/files/scripts/syncd.sh index 50c183f21ab0..4f42661a48e0 100755 --- a/files/scripts/syncd.sh +++ b/files/scripts/syncd.sh @@ -92,16 +92,6 @@ function startplatform() { fi } -function waitplatform() { - - BOOT_TYPE=`getBootType` - if [[ x"$sonic_asic_platform" == x"mellanox" ]]; then - debug "Starting pmon service..." - /bin/systemctl start pmon - debug "Started pmon service" - fi -} - function stopplatform1() { if [[ x$sonic_asic_platform == x"mellanox" ]] && [[ x$TYPE == x"cold" ]]; then diff --git a/files/scripts/syncd_common.sh b/files/scripts/syncd_common.sh index 826cdd731ba6..c9f7c46b3ad0 100755 --- a/files/scripts/syncd_common.sh +++ b/files/scripts/syncd_common.sh @@ -5,7 +5,6 @@ # scripts using this must provide implementations of the following functions: # # startplatform -# waitplatform # stopplatform1 and stopplatform2 # # For examples of these, see gbsyncd.sh and syncd.sh. @@ -141,8 +140,6 @@ wait() { fi fi - waitplatform - /usr/bin/${SERVICE}.sh wait $DEV }