DellEMC use sonic-cfggen to get the hwsku(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) for device path directory during platform initialization script.
But during boot-time(only), sonic-cfggen throws following error.
May 04 10:06:44 sonic z9332f_platform.sh[763]: Traceback (most recent call last):
May 04 10:06:44 sonic z9332f_platform.sh[763]: File "/usr/local/bin/sonic-cfggen", line 451, in <module>
May 04 10:06:44 sonic z9332f_platform.sh[763]: main()
May 04 10:06:44 sonic z9332f_platform.sh[763]: File "/usr/local/bin/sonic-cfggen", line 304, in main
May 04 10:06:44 sonic z9332f_platform.sh[763]: SonicDBConfig.load_sonic_db_config()
May 04 10:06:44 sonic z9332f_platform.sh[763]: File "/usr/lib/python3/dist-packages/swsscommon/swsscommon.py", line 1252, in load_sonic_db_config
May 04 10:06:44 sonic z9332f_platform.sh[763]: SonicDBConfig.initialize(sonic_db_file_path)
May 04 10:06:44 sonic z9332f_platform.sh[763]: File "/usr/lib/python3/dist-packages/swsscommon/swsscommon.py", line 1247, in initialize
May 04 10:06:44 sonic z9332f_platform.sh[763]: return _swsscommon.SonicDBConfig_initialize(*args, **kwargs)
May 04 10:06:44 sonic z9332f_platform.sh[763]: RuntimeError: Sonic database config file doesn't exist at /var/run/redis/sonic-db/database_config.json
Hence, sonic_platform package installation has failed due to missing package wheel location with device path directory.
May 04 10:06:45 sonic z9332f_platform.sh[764]: WARNING: Requirement '/usr/share/sonic/device//sonic_platform-1.0-py3-none-any.whl' looks like a filename, but the file does not exist
May 04 10:06:45 sonic z9332f_platform.sh[764]: ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/usr/share/sonic/device/sonic_platform-1.0-py3-none-any.whl'
Deinit and reinit the platform initialization script installs python package.
But "config reload" didnot resolve the issue.
Steps to reproduce the issue:
Load latest master.
Run "sfputil" command and observe "No sonic_platform module error".
Describe the results you received:
Run "sfputil" command and observe "No sonic_platform module error".
root@str2-z9332f-05:~# sfputil show eeprom -d -p Ethernet0
Traceback (most recent call last):
File "/usr/local/bin/sfputil", line 5, in <module>
from sfputil.main import cli
File "/usr/local/lib/python3.9/dist-packages/sfputil/main.py", line 17, in <module>
import sonic_platform
ModuleNotFoundError: No module named 'sonic_platform'
root@str2-z9332f-05:~#
Description
DellEMC use sonic-cfggen to get the hwsku(
/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform
) for device path directory during platform initialization script.But during boot-time(only), sonic-cfggen throws following error.
Hence, sonic_platform package installation has failed due to missing package wheel location with device path directory.
Deinit and reinit the platform initialization script installs python package.
But "config reload" didnot resolve the issue.
Steps to reproduce the issue:
Describe the results you received:
Run "sfputil" command and observe "No sonic_platform module error".
Describe the results you expected:
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):