Skip to content

Added makefile and dependencies for building sonic-stormond whl#19042

Merged
yxieca merged 7 commits intosonic-net:masterfrom
ashwnsri:stormon-mkfile-deps
Jun 5, 2024
Merged

Added makefile and dependencies for building sonic-stormond whl#19042
yxieca merged 7 commits intosonic-net:masterfrom
ashwnsri:stormon-mkfile-deps

Conversation

@ashwnsri
Copy link
Contributor

@ashwnsri ashwnsri commented May 22, 2024

Why I did it

This is a sister PR to the stormond implementation.
SONiC Storage Monitoring Daemon HLD and has following changes:

  1. Adds the makefile and dependencies file so as to be able to build the sonic-stormond wheel.
  2. Changed vendor implementation of ssd_util to match sonic-platform-common change where names of sonic-platform-common/sonic_platform_base/sonic_ssd and its constituent files were changed.
Work item tracking
  • Microsoft ADO (number only): 17468992

How I did it

Added files needed to build the stormond wheel
Changed the import path to match the new folder structure in sonic-platform-common

How to verify it

Pull these changes and run:

make -f Makefile.work BLDENV=bookworm KEEP_SLAVE_ON=no target/python-wheels/bookworm/sonic_stormond-1.0-py3-none-any.whl

Verify that the wheel is successfully built:

assrinivasan@assrinivasan-dev-vm-1:/data/sonic/ssdmon/sonic-buildimage$ ls -l target/python-wheels/bookworm/sonic_stormond-1.0-py3-none-any.whl
-rw-r--r-- 1 assrinivasan assrinivasan 5977 May 22 18:24 target/python-wheels/bookworm/sonic_stormond-1.0-py3-none-any.whl

After Storage monitoring daemon and associated changes have been merged, pick up this change. Then run the ssdutil command as follows:

admin@str-s6100-acs-1:/usr/local/lib/python3.11/dist-packages$ cat ssdutil/* | grep -i "ssdutil"
SYSLOG_IDENTIFIER = "ssdutil"
        from ssd_util import SsdUtil
        log.log_warning("Platform specific SsdUtil module not found. Falling down to the generic implementation")
            **from sonic_platform_base.sonic_storage.ssd import SsdUtil**
            log.log_error("Failed to import default SsdUtil. Error: {}".format(str(e)), True)
    return SsdUtil(diskdev)
cat: def ssdutil():
ssdutil/__pycache__    ssdutil()

admin@str-s6100-acs-1:/usr/local/lib/python3.11/dist-packages$ sudo ssdutil
Device Model : InnoDisk Corp. - mSATA 3IE3
Health       : 99%
Temperature  : 30C

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

  • master

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@ashwnsri ashwnsri requested review from prgeor and saiarcot895 May 22, 2024 18:31
@ashwnsri ashwnsri marked this pull request as draft May 22, 2024 18:36
@ashwnsri
Copy link
Contributor Author

This will probably fail the build pipeline because the necessary sonic-platform-common+daemon changes are not yet merged. Have converted this PR to a draft until the other PRs are merged.

prgeor
prgeor previously approved these changes May 22, 2024
@ashwnsri ashwnsri marked this pull request as ready for review May 29, 2024 01:43
prgeor
prgeor previously approved these changes May 30, 2024
@prgeor
Copy link
Contributor

prgeor commented May 30, 2024

@assrinivasan build failing

@ashwnsri
Copy link
Contributor Author

@assrinivasan build failing

Yes Prince it will pass once platform-common and daemon PRs are merged:

Build start time: Thu May 23 07:04:51 UTC 2024
[ REASON ] : target/python-wheels/bookworm/sonic_stormond-1.0-py3-none-any.whl does not exist NON-EXISTENT PREREQUISITES: target/python-wheels/bookworm/sonic_py_common-1.0-py3-none-any.whl-install

@ashwnsri
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ashwnsri ashwnsri force-pushed the stormon-mkfile-deps branch from e5ee2e8 to 72d1d24 Compare May 31, 2024 00:05
@ashwnsri
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ashwnsri
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ashwnsri ashwnsri force-pushed the stormon-mkfile-deps branch from c9e712c to 2a1eb7d Compare June 3, 2024 18:15
@ashwnsri
Copy link
Contributor Author

ashwnsri commented Jun 5, 2024

@prgeor @lguohan all checks have passed. Please help merge. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants