Skip to content

Commit

Permalink
Added makefile and dependencies for building sonic-stormond whl (soni…
Browse files Browse the repository at this point in the history
…c-net#19042)

* Added makefile and dependencies for building sonic-stormond whl

* Added sonic-stormond to supervisord and wheel to pmon container makefile

* Advanced submodules of platform-common and daemons to pick up stormond

* Changed the import path of ssdutil in vendor ssdutil to match stormon changes

* Advancing the sonic-utilities submodule to include stormon-related change

* Advanced sonic-platform-daemons submodule to the latest HEAD

* Advanced sonic-utilities to include fix for test_iface_namingmode
  • Loading branch information
assrinivasan authored and arun1355492 committed Jul 26, 2024
1 parent 3eb2277 commit 94ebf76
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 20 deletions.
2 changes: 1 addition & 1 deletion device/arista/x86_64-arista_common/plugins/ssd_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
try:
from arista.utils.sonic_ssd import SsdUtil
except ImportError:
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil
from sonic_platform_base.sonic_storage.ssd import SsdUtil
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

try:
import subprocess
from sonic_platform_base.sonic_ssd.ssd_base import SsdBase
from sonic_platform_base.sonic_storage.storage_base import StorageBase
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

Expand All @@ -18,7 +18,7 @@
FIRMWARE_CMD = "cat /sys/kernel/debug/mmc0/mmc0:0001/ext_csd | cut -c 509-522"
NOT_AVAILABLE = "N/A"

class SsdUtil(SsdBase):
class SsdUtil(StorageBase):
"""
Generic implementation of the SSD health API
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

try:
import subprocess
from sonic_platform_base.sonic_ssd.ssd_base import SsdBase
from sonic_platform_base.sonic_storage.storage_base import StorageBase
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

Expand All @@ -18,7 +18,7 @@
FIRMWARE_CMD = "cat /sys/kernel/debug/mmc0/mmc0:0001/ext_csd | cut -c 509-522"
NOT_AVAILABLE = "N/A"

class SsdUtil(SsdBase):
class SsdUtil(StorageBase):
"""
Generic implementation of the SSD health API
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
try:
from sonic_ssd import SsdUtil
except ImportError:
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil
from sonic_platform_base.sonic_storage.ssd import SsdUtil
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import os

from sonic_platform_base.sonic_ssd.ssd_emmc import EmmcUtil
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as SsdUtilDefault
from sonic_platform_base.sonic_storage.emmc import EmmcUtil
from sonic_platform_base.sonic_storage.ssd import SsdUtil as SsdUtilDefault

def SsdUtil(diskdev):
if os.path.basename(diskdev).startswith('mmcblk'):
Expand Down
4 changes: 2 additions & 2 deletions device/pensando/arm64-elba-asic-r0/plugins/ssd_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
try:
import re
import subprocess
from sonic_platform_base.sonic_ssd.ssd_base import SsdBase
from sonic_platform_base.sonic_storage.storage_base import StorageBase
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

NOT_AVAILABLE = "N/A"
MMC_DATA_PATH = "/sys/class/mmc_host/mmc0/mmc0:0001/{}"

class SsdUtil(SsdBase):
class SsdUtil(StorageBase):
"""
Generic implementation of the SSD health API
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import re
import os
import subprocess
from sonic_platform_base.sonic_ssd.ssd_base import SsdBase
from sonic_platform_base.sonic_storage.storage_base import StorageBase
except ImportError as e:
raise ImportError (str(e) + "- required module not found")

Expand All @@ -30,7 +30,7 @@
INNODISK_HEALTH_ID = 169
INNODISK_TEMPERATURE_ID = 194

class SsdUtil(SsdBase):
class SsdUtil(StorageBase):
"""
Generic implementation of the SSD health API
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# ssd_health
#

from sonic_platform_base.sonic_ssd.ssd_base import SsdBase
from sonic_platform_base.sonic_storage.storage_base import StorageBase
from subprocess import Popen, PIPE
from re import findall
from os.path import exists

NOT_AVAILABLE = "N/A"

class SsdUtil(SsdBase):
class SsdUtil(StorageBase):

def __init__(self, diskdev):
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as SsdUtilGeneric
from sonic_platform_base.sonic_storage.ssd import SsdUtil as SsdUtilGeneric

class SsdUtil(SsdUtilGeneric):
def parse_innodisk_info(self):
Expand Down
13 changes: 13 additions & 0 deletions dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,16 @@ startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}

{% if not skip_stormond %}
[program:stormond]
command=/usr/local/bin/stormond
priority=10
autostart=false
autorestart=unexpected
stdout_logfile=syslog
stderr_logfile=syslog
startsecs=10
dependent_startup=true
dependent_startup_wait_for=rsyslogd:running
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import os

# pylint: disable=import-error
from sonic_platform_base.sonic_ssd.ssd_base import SsdBase
from sonic_platform_base.sonic_ssd.ssd_generic import SsdUtil as SsdUtilDefault
from sonic_platform_base.sonic_storage.storage_base import StorageBase
from sonic_platform_base.sonic_storage.ssd import SsdUtil as SsdUtilDefault

class EmmcUtil(SsdBase):
class EmmcUtil(StorageBase):
def __init__(self, diskdev):
self.diskdev = diskdev
self.path = os.path.join('/sys/block', os.path.basename(diskdev))
Expand Down
1 change: 1 addition & 0 deletions rules/docker-platform-monitor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ $(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_SENSORMOND_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_XCVRD_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_YCABLED_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_CHASSISD_PY3)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_STORMOND_PY3)

ifeq ($(PDDF_SUPPORT),y)
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(PDDF_PLATFORM_API_BASE_PY3)
Expand Down
10 changes: 10 additions & 0 deletions rules/sonic-stormond.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SPATH:= $($(SONIC_STORMOND_PY3)_SRC_PATH)
DEP_FILES:= $(SONIC_COMMON_FILES_LIST) rules/sonic-stormond.mk rules/sonic-stormond.dep
DEP_FILES+= $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES:= $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))

$(SONIC_STORMOND_PY3)_CACHE_MODE:= GIT_CONTENT_SHA
$(SONIC_STORMOND_PY3)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST)
$(SONIC_STORMOND_PY3)_DEP_FILES:= $(DEP_FILES)
$(SONIC_STORMOND_PY3)_SMDEP_FILES:= $(SMDEP_FILES)
$(SONIC_STORMOND_PY3)_SMDEP_PATHS:= $(SPATH)
9 changes: 9 additions & 0 deletions rules/sonic-stormond.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# sonic-stormond (SONiC Storage Monitoring daemon) Debian package

# SONIC_STORMOND_PY3 package

SONIC_STORMOND_PY3 = sonic_stormond-1.0-py3-none-any.whl
$(SONIC_STORMOND_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-stormond
$(SONIC_STORMOND_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3)
$(SONIC_STORMOND_PY3)_PYTHON_VERSION = 3
SONIC_PYTHON_WHEELS += $(SONIC_STORMOND_PY3)
2 changes: 1 addition & 1 deletion src/sonic-utilities
Submodule sonic-utilities updated 93 files
+35 −0 .azure-pipelines/pre-commit-check.yml
+9 −0 .pre-commit-config.yaml
+17 −0 azure-pipelines.yml
+23 −1 clear/main.py
+4 −4 config/aaa.py
+100 −1 config/chassis_modules.py
+255 −29 config/main.py
+2 −2 config/plugins/mlnx.py
+393 −0 config/plugins/sonic-system-ldap_yang.py
+135 −0 config/switchport.py
+202 −123 config/vlan.py
+363 −0 doc/Command-Reference.md
+1 −1 generic_config_updater/gcu_field_operation_validators.conf.json
+12 −17 generic_config_updater/generic_updater.py
+1 −0 generic_config_updater/gu_common.py
+119 −106 pfc/main.py
+52 −0 scripts/db_migrator.py
+59 −8 scripts/fabricstat
+55 −2 scripts/fast-reboot
+2 −0 scripts/generate_dump
+4 −5 scripts/mellanox_buffer_migrator.py
+23 −1 scripts/reboot
+1 −1 scripts/soft-reboot
+2 −1 setup.py
+10 −0 show/fabric.py
+76 −3 show/interfaces/__init__.py
+99 −2 show/main.py
+145 −0 show/plugins/sonic-system-ldap_yang.py
+4 −0 sonic_installer/main.py
+128 −1 sonic_package_manager/main.py
+301 −33 sonic_package_manager/manager.py
+40 −0 sonic_package_manager/manifest.py
+42 −15 sonic_package_manager/metadata.py
+35 −11 sonic_package_manager/service_creator/creator.py
+25 −10 sonic_package_manager/source.py
+1 −1 ssdutil/main.py
+12 −0 tests/asic_sdk_health_event_input/config_db.json
+19 −0 tests/asic_sdk_health_event_input/state_db.json
+9 −0 tests/asic_sdk_health_event_input/state_db_no_event.json
+13 −0 tests/asic_sdk_health_event_input/state_db_no_fatal.json
+13 −0 tests/asic_sdk_health_event_input/state_db_no_notice.json
+12 −0 tests/asic_sdk_health_event_input/state_db_no_warning.json
+205 −0 tests/asic_sdk_health_event_test.py
+113 −0 tests/chassis_modules_test.py
+5 −0 tests/config_save_output/all_config_db.json
+352 −1 tests/config_test.py
+7 −4 tests/conftest.py
+11 −0 tests/db_migrator_input/config_db/empty-config-with-device-info-nvidia-expected.json
+6 −0 tests/db_migrator_input/config_db/empty-config-with-device-info-nvidia-input.json
+6 −0 tests/db_migrator_input/config_db/per_command_aaa_disable.json
+6 −0 tests/db_migrator_input/config_db/per_command_aaa_disable_expected.json
+8 −0 tests/db_migrator_input/config_db/per_command_aaa_disable_golden.json
+9 −0 tests/db_migrator_input/config_db/per_command_aaa_enable.json
+15 −0 tests/db_migrator_input/config_db/per_command_aaa_enable_expected.json
+19 −0 tests/db_migrator_input/config_db/per_command_aaa_enable_golden.json
+9 −0 tests/db_migrator_input/config_db/per_command_aaa_no_authentication.json
+15 −0 tests/db_migrator_input/config_db/per_command_aaa_no_authentication_expected.json
+19 −0 tests/db_migrator_input/config_db/per_command_aaa_no_authentication_golden.json
+15 −0 tests/db_migrator_input/config_db/per_command_aaa_no_change.json
+15 −0 tests/db_migrator_input/config_db/per_command_aaa_no_change_expected.json
+19 −0 tests/db_migrator_input/config_db/per_command_aaa_no_change_golden.json
+11 −0 tests/db_migrator_input/config_db/per_command_aaa_no_passkey.json
+11 −0 tests/db_migrator_input/config_db/per_command_aaa_no_passkey_expected.json
+15 −0 tests/db_migrator_input/config_db/per_command_aaa_no_passkey_golden.json
+5 −0 tests/db_migrator_input/config_db/per_command_aaa_no_tacplus.json
+15 −0 tests/db_migrator_input/config_db/per_command_aaa_no_tacplus_expected.json
+19 −0 tests/db_migrator_input/config_db/per_command_aaa_no_tacplus_golden.json
+50 −0 tests/db_migrator_test.py
+53 −0 tests/fabricstat_test.py
+172 −13 tests/interfaces_test.py
+93 −37 tests/ip_config_test.py
+20 −0 tests/ldap_input/assert_show_output.py
+11 −0 tests/ldap_input/default_config_db.json
+5 −0 tests/ldap_input/server_config_db.json
+126 −0 tests/ldap_test.py
+1 −2 tests/loopback_action_test.py
+1 −0 tests/mock_tables/asic0/config_db.json
+30 −5 tests/mock_tables/asic0/state_db.json
+31 −0 tests/mock_tables/config_db.json
+4 −9 tests/mpls_test.py
+82 −0 tests/pfc_input/assert_show_output.py
+81 −0 tests/pfc_test.py
+5 −3 tests/sonic_package_manager/conftest.py
+223 −0 tests/sonic_package_manager/test_cli.py
+206 −4 tests/sonic_package_manager/test_manager.py
+33 −1 tests/sonic_package_manager/test_manifest.py
+126 −3 tests/sonic_package_manager/test_metadata.py
+18 −0 tests/sonic_package_manager/test_service_creator.py
+42 −0 tests/ssdutil_test.py
+3 −0 tests/test_sonic_installer.py
+1,017 −215 tests/vlan_test.py
+6 −5 utilities_common/bgp_util.py
+231 −36 utilities_common/cli.py

0 comments on commit 94ebf76

Please sign in to comment.