Skip to content

Modular chassis: Psud set master led on first run #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

mprabhu-nokia
Copy link
Contributor

On first run, the PSU master-led on supervisor of modular-chassis is not set.

Description

The PSU master-led on modular chassis indicates the power-buget status. Similar to individual PSU leds that are set on first_run, the master-led also will be set to based on initial status (RED or GREEN with LED status ON).

Motivation and Context

Without the forced setting of first_run, the master-led status will default to per vendor default. In some cases, this could be amber blinking etc

How Has This Been Tested?

This has been tested on real HW and unit-tests using pytest suite.

tests/test_DaemonPsud.py::TestDaemonPsud::test_signal_handler PASSED                              [  3%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_run PASSED                                         [  6%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_psu_data PASSED                             [ 10%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_single_psu_data PASSED                      [ 13%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_set_psu_led PASSED                                 [ 17%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_led_color PASSED                            [ 20%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_psu_fan_led_status PASSED                   [ 24%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_psu_chassis_info PASSED                     [ 27%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_psu_entity_info PASSED                      [ 31%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_single_psu_entity_info PASSED               [ 34%]
tests/test_DaemonPsud.py::TestDaemonPsud::test_update_psu_fan_data PASSED                         [ 37%]
tests/test_PsuChassisInfo.py::TestPsuChassisInfo::test_update_master_status PASSED                [ 41%]
tests/test_PsuChassisInfo.py::TestPsuChassisInfo::test_supplied_power PASSED                      [ 44%]
tests/test_PsuChassisInfo.py::TestPsuChassisInfo::test_consumed_power PASSED                      [ 48%]
tests/test_PsuChassisInfo.py::TestPsuChassisInfo::test_power_budget PASSED                        [ 51%]
tests/test_PsuChassisInfo.py::TestPsuChassisInfo::test_first_run PASSED                           [ 55%]
tests/test_PsuChassisInfo.py::TestPsuChassisInfo::test_get_psu_key PASSED                         [ 58%]
tests/test_PsuChassisInfo.py::TestPsuChassisInfo::test_try_get PASSED                             [ 62%]
tests/test_PsuStatus.py::TestPsuStatus::test_set_presence PASSED                                  [ 65%]
tests/test_PsuStatus.py::TestPsuStatus::test_set_power_good PASSED                                [ 68%]
tests/test_PsuStatus.py::TestPsuStatus::test_set_voltage PASSED                                   [ 72%]
tests/test_PsuStatus.py::TestPsuStatus::test_set_temperature PASSED                               [ 75%]
tests/test_PsuStatus.py::TestPsuStatus::test_is_ok PASSED                                         [ 79%]
tests/test_psud.py::test_wrapper_get_num_psus PASSED                                              [ 82%]
tests/test_psud.py::test_wrapper_get_psu_presence PASSED                                          [ 86%]
tests/test_psud.py::test_wrapper_get_psu_status PASSED                                            [ 89%]
tests/test_psud.py::test_psu_db_update PASSED                                                     [ 93%]
tests/test_psud.py::test_log_on_status_changed PASSED                                             [ 96%]
tests/test_psud.py::test_main PASSED                                                              [100%]

----------- generated xml file: /sonic/src/sonic-platform-daemons/sonic-psud/test-results.xml -----------

---------- coverage: platform linux2, python 2.7.16-final-0 ----------
Name           Stmts   Miss  Cover
----------------------------------
scripts/psud     366     10    97%
Coverage HTML written to dir htmlcov
Coverage XML written to file coverage.xml

======================================= 29 passed in 3.29 seconds =======================================

Additional Information (Optional)

@mprabhu-nokia
Copy link
Contributor Author

@judyjoseph Please review when you get a chance or add the component owner as reviewer.

@liushilongbuaa
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@anshuv-mfst
Copy link

@lguohan - could you please assign reviewer to this PR (Platform daemon related), thanks

@anshuv-mfst
Copy link

Hi @ysmanman - could you please review and approve as well, thanks.

@prgeor
Copy link
Collaborator

prgeor commented Feb 8, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prgeor
Copy link
Collaborator

prgeor commented Feb 8, 2022

@sujinmkang could you review?

@sujinmkang sujinmkang merged commit 7d7c85e into sonic-net:master Feb 11, 2022
judyjoseph pushed a commit that referenced this pull request Mar 20, 2022
On first run, the PSU master-led on supervisor of modular-chassis is not set.

Description
The PSU master-led on modular chassis indicates the power-buget status. Similar to individual PSU leds that are set on first_run, the master-led also will be set to based on initial status (RED or GREEN with LED status ON).

Motivation and Context
Without the forced setting of first_run, the master-led status will default to per vendor default. In some cases, this could be amber blinking etc
vdahiya12 pushed a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
… host_electrical_interface, connector_dict (sonic-net#206)

Due to wrong page selection, the eeprom read returned a value 0xff which was an invalid key into connector_dict[]. Now we verify the key validity before accessing the dict element. The fix for why the eeprom read returned 0xff is being investigated separately.

Signed-off-by: Prince George <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants