facebook / fboss

Facebook Open Switching System Software for controlling network switches.
Other
860 stars 295 forks source link

MERU800: led_manager corrected paths #232

Closed aalamsi22 closed 1 week ago

aalamsi22 commented 2 weeks ago

Description

Updated the LED manager configs to use correct status LED paths. This change correlates to a driver update that fix an issue where the LEDs are not initializing correctly.

Testing

More testing documented on the PR with the driver changes.

# /usr/bin/data_corral_service_hw_test -config_file /opt/fboss/share/platform_configs/led_manager.json
[==========] Running 5 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 5 tests from DataCorralServiceHwTest
[ RUN      ] DataCorralServiceHwTest.FruLedProgrammingSysfsCheck
I0913 19:11:36.525150  7031 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
I0913 19:11:36.525228  7031 FruPresenceExplorer.cpp:25] Detecting presence of FRUs
I0913 19:11:36.526361  7031 FruPresenceExplorer.cpp:40] Detected that FAN1 is present
I0913 19:11:36.527389  7031 FruPresenceExplorer.cpp:40] Detected that FAN2 is present
I0913 19:11:36.528351  7031 FruPresenceExplorer.cpp:40] Detected that FAN3 is present
I0913 19:11:36.529342  7031 FruPresenceExplorer.cpp:40] Detected that FAN4 is present
I0913 19:11:36.529363  7031 FruPresenceExplorer.cpp:40] Detected that PSU1 is present
I0913 19:11:36.529375  7031 FruPresenceExplorer.cpp:40] Detected that PSU2 is present
I0913 19:11:36.529435  7031 LedManager.cpp:45] Programming PSU LED with true
I0913 19:11:36.529490  7031 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/psu_led:green:status/brightness
I0913 19:11:36.529540  7031 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/psu_led:red:status/brightness
I0913 19:11:36.529547  7031 LedManager.cpp:55] Programmed PSU LED with presence true
I0913 19:11:36.529553  7031 LedManager.cpp:45] Programming FAN LED with true
I0913 19:11:36.529571  7031 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/fan_led:green:status/brightness
I0913 19:11:36.529588  7031 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/fan_led:red:status/brightness
I0913 19:11:36.529592  7031 LedManager.cpp:55] Programmed FAN LED with presence true
I0913 19:11:36.529598  7031 LedManager.cpp:25] Programming system LED with true
I0913 19:11:36.529615  7031 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/sys_led:green:status/brightness
I0913 19:11:36.529631  7031 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/sys_led:red:status/brightness
I0913 19:11:36.529636  7031 LedManager.cpp:34] Programmed system LED with true
[       OK ] DataCorralServiceHwTest.FruLedProgrammingSysfsCheck (4 ms)
[ RUN      ] DataCorralServiceHwTest.FruLEDProgrammingODSCheck
I0913 19:11:36.529689  7031 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
I0913 19:11:36.529727  7031 FruPresenceExplorer.cpp:25] Detecting presence of FRUs
I0913 19:11:36.530354  7031 FruPresenceExplorer.cpp:40] Detected that FAN1 is present
I0913 19:11:36.531470  7031 FruPresenceExplorer.cpp:40] Detected that FAN2 is present
I0913 19:11:36.532351  7031 FruPresenceExplorer.cpp:40] Detected that FAN3 is present
I0913 19:11:36.533356  7031 FruPresenceExplorer.cpp:40] Detected that FAN4 is present
I0913 19:11:36.533370  7031 FruPresenceExplorer.cpp:40] Detected that PSU1 is present
I0913 19:11:36.533383  7031 FruPresenceExplorer.cpp:40] Detected that PSU2 is present
I0913 19:11:36.533388  7031 LedManager.cpp:45] Programming PSU LED with true
I0913 19:11:36.533405  7031 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/psu_led:green:status/brightness
I0913 19:11:36.533421  7031 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/psu_led:red:status/brightness
I0913 19:11:36.533430  7031 LedManager.cpp:55] Programmed PSU LED with presence true
I0913 19:11:36.533435  7031 LedManager.cpp:45] Programming FAN LED with true
I0913 19:11:36.533450  7031 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/fan_led:green:status/brightness
I0913 19:11:36.533465  7031 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/fan_led:red:status/brightness
I0913 19:11:36.533469  7031 LedManager.cpp:55] Programmed FAN LED with presence true
I0913 19:11:36.533477  7031 LedManager.cpp:25] Programming system LED with true
I0913 19:11:36.533492  7031 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/sys_led:green:status/brightness
I0913 19:11:36.533507  7031 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/sys_led:red:status/brightness
I0913 19:11:36.533511  7031 LedManager.cpp:34] Programmed system LED with true
[       OK ] DataCorralServiceHwTest.FruLEDProgrammingODSCheck (3 ms)
[ RUN      ] DataCorralServiceHwTest.getCachedFruid
I0913 19:11:36.533534  7031 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
I0913 19:11:36.534390  7038 ThriftServer.cpp:833] Using thread manager (resource pools not enabled) on address/port [::1]:0: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
I0913 19:11:36.536654  7039 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
E20240913 19:11:36.536772  7040 service_tcc.h:155] Service handler threw an uncaught exception in method getFruid: std::runtime_error: Invalid EEPROM name CHASSIS. Valid EEPROM names are: . Only those exception types which are declared in the thrift IDL for this service method can be serialized directly. All other exception types are caught and their message strings sent as a generic application-error exception. Such as here.
unknown file: Failure
C++ exception with description "std::runtime_error: Invalid EEPROM name CHASSIS. Valid EEPROM names are: " thrown in the test body.
[  FAILED  ] DataCorralServiceHwTest.getCachedFruid (4 ms)
[ RUN      ] DataCorralServiceHwTest.getUncachedFruid
I0913 19:11:36.537639  7031 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
I0913 19:11:36.537859  7059 ThriftServer.cpp:833] Using thread manager (resource pools not enabled) on address/port [::1]:0: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
I0913 19:11:36.538616  7060 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
unknown file: Failure
C++ exception with description "std::runtime_error: Invalid EEPROM name CHASSIS. Valid EEPROM names are: " thrown in the test body.
[  FAILED  ] DataCorralServiceHwTest.getUncachedFruid (1 ms)
[ RUN      ] DataCorralServiceHwTest.testThrift
I0913 19:11:36.539173  7031 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
I0913 19:11:36.539389  7064 ThriftServer.cpp:833] Using thread manager (resource pools not enabled) on address/port [::1]:0: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
I0913 19:11:36.540135  7065 ConfigLib.cpp:48] Using config file: /opt/fboss/share/platform_configs/led_manager.json
unknown file: Failure
C++ exception with description "std::runtime_error: Invalid EEPROM name CHASSIS. Valid EEPROM names are: " thrown in the test body.
[  FAILED  ] DataCorralServiceHwTest.testThrift (1 ms)
[----------] 5 tests from DataCorralServiceHwTest (15 ms total)

[----------] Global test environment tear-down
[==========] 5 tests from 1 test suite ran. (15 ms total)
[  PASSED  ] 2 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] DataCorralServiceHwTest.getCachedFruid
[  FAILED  ] DataCorralServiceHwTest.getUncachedFruid
[  FAILED  ] DataCorralServiceHwTest.testThrift

 3 FAILED TESTS
facebook-github-bot commented 2 weeks ago

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

kimdo8736 commented 2 weeks ago

Please run DataCorral service and DataCorralHwTest to verify the config changes.

facebook-github-bot commented 2 weeks ago

@aalamsi22 has updated the pull request. You must reimport the pull request before landing.

aalamsi22 commented 2 weeks ago

Please run DataCorral service and DataCorralHwTest to verify the config changes.

I ran the tests, and some hit this issue:

C++ exception with description "std::runtime_error: Invalid EEPROM name CHASSIS. Valid EEPROM names are: " thrown in the test body.

Seems unrelated to the change and caused by an assumption that the chassis eeprom name is "CHASSIS".

facebook-github-bot commented 2 weeks ago

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 week ago

@joancaneus merged this pull request in facebook/fboss@b30de74a347b9af2ec5ec3d12d7cc7ce59627df3.