Skip to content

Conversation

aalamsi22
Copy link
Contributor

@aalamsi22 aalamsi22 commented Jun 13, 2025

Description

NOTE: This is part of a series of PRs to add support for Glath05a-64o. The dependency chain of the PRs is as follows:

Glath05a-64o: define new platform #461
Glath05a-64o: platform manager #462 – Depends on #461
Glath05a-64o: add sensor_service support #467 – Depends on #462
Glath05a-64o: weutil config #468 – Depends on #462
Glath05a-64o: add fan_service config #469 – Depends on #467
Glath05a-64o: fw_util support #470 – Depends on #461
Glath05a-64o: bsp mapping #471 – Depends on #461
Glath05a-64o: platform mapping #472 – Depends on #471
Glath05a-64o: led service #473 – Depends on #472

  • Add led_manager.json
  • Add led_service support to create BSP LED Manager.

Testing

# /opt/fboss/bin/data_corral_service_hw_test --led_manager_config_file /opt/fboss/share/platform_configs/led_manager.json --weutil_config_file /opt/fboss/share/platform_configs/weutil.json
[==========] Running 5 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 5 tests from DataCorralServiceHwTest
[ RUN      ] DataCorralServiceHwTest.FruLedProgrammingSysfsCheck
I0612 00:41:46.193381  8960 FruPresenceExplorer.cpp:26] Detecting presence of FRUs
I0612 00:41:46.193403  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN1 (via sysfs)
I0612 00:41:46.194464  8960 FruPresenceExplorer.cpp:49] Detected that FAN1 is present
I0612 00:41:46.194468  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN2 (via sysfs)
I0612 00:41:46.195606  8960 FruPresenceExplorer.cpp:49] Detected that FAN2 is present
I0612 00:41:46.195610  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN3 (via sysfs)
I0612 00:41:46.196747  8960 FruPresenceExplorer.cpp:49] Detected that FAN3 is present
I0612 00:41:46.196751  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN4 (via sysfs)
I0612 00:41:46.197878  8960 FruPresenceExplorer.cpp:49] Detected that FAN4 is present
I0612 00:41:46.197883  8960 FruPresenceExplorer.cpp:34] Detecting presence of PSU1 (via sysfs)
I0612 00:41:46.197899  8960 FruPresenceExplorer.cpp:49] Detected that PSU1 is present
I0612 00:41:46.197903  8960 FruPresenceExplorer.cpp:34] Detecting presence of PSU2 (via sysfs)
I0612 00:41:46.197915  8960 FruPresenceExplorer.cpp:49] Detected that PSU2 is present
I0612 00:41:46.197950  8960 LedManager.cpp:45] Programming PSU LED with true
I0612 00:41:46.197986  8960 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/psu_led:green:status/brightness
I0612 00:41:46.198004  8960 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/psu_led:red:status/brightness
I0612 00:41:46.198009  8960 LedManager.cpp:55] Programmed PSU LED with presence true
I0612 00:41:46.198014  8960 LedManager.cpp:45] Programming FAN LED with true
I0612 00:41:46.198030  8960 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/fan_led:green:status/brightness
I0612 00:41:46.198047  8960 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/fan_led:red:status/brightness
I0612 00:41:46.198052  8960 LedManager.cpp:55] Programmed FAN LED with presence true
I0612 00:41:46.198057  8960 LedManager.cpp:25] Programming system LED with true
I0612 00:41:46.198073  8960 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/sys_led:green:status/brightness
I0612 00:41:46.198088  8960 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/sys_led:red:status/brightness
I0612 00:41:46.198093  8960 LedManager.cpp:34] Programmed system LED with true
[       OK ] DataCorralServiceHwTest.FruLedProgrammingSysfsCheck (4 ms)
[ RUN      ] DataCorralServiceHwTest.FruLEDProgrammingODSCheck
I0612 00:41:46.198167  8960 FruPresenceExplorer.cpp:26] Detecting presence of FRUs
I0612 00:41:46.198171  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN1 (via sysfs)
I0612 00:41:46.199005  8960 FruPresenceExplorer.cpp:49] Detected that FAN1 is present
I0612 00:41:46.199012  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN2 (via sysfs)
I0612 00:41:46.199999  8960 FruPresenceExplorer.cpp:49] Detected that FAN2 is present
I0612 00:41:46.200004  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN3 (via sysfs)
I0612 00:41:46.201041  8960 FruPresenceExplorer.cpp:49] Detected that FAN3 is present
I0612 00:41:46.201046  8960 FruPresenceExplorer.cpp:34] Detecting presence of FAN4 (via sysfs)
I0612 00:41:46.201999  8960 FruPresenceExplorer.cpp:49] Detected that FAN4 is present
I0612 00:41:46.202003  8960 FruPresenceExplorer.cpp:34] Detecting presence of PSU1 (via sysfs)
I0612 00:41:46.202015  8960 FruPresenceExplorer.cpp:49] Detected that PSU1 is present
I0612 00:41:46.202019  8960 FruPresenceExplorer.cpp:34] Detecting presence of PSU2 (via sysfs)
I0612 00:41:46.202029  8960 FruPresenceExplorer.cpp:49] Detected that PSU2 is present
I0612 00:41:46.202035  8960 LedManager.cpp:45] Programming PSU LED with true
I0612 00:41:46.202050  8960 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/psu_led:green:status/brightness
I0612 00:41:46.202064  8960 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/psu_led:red:status/brightness
I0612 00:41:46.202068  8960 LedManager.cpp:55] Programmed PSU LED with presence true
I0612 00:41:46.202073  8960 LedManager.cpp:45] Programming FAN LED with true
I0612 00:41:46.202085  8960 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/fan_led:green:status/brightness
I0612 00:41:46.202097  8960 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/fan_led:red:status/brightness
I0612 00:41:46.202102  8960 LedManager.cpp:55] Programmed FAN LED with presence true
I0612 00:41:46.202106  8960 LedManager.cpp:25] Programming system LED with true
I0612 00:41:46.202119  8960 LedManager.cpp:80] Wrote 1 to file /sys/class/leds/sys_led:green:status/brightness
I0612 00:41:46.202132  8960 LedManager.cpp:80] Wrote 0 to file /sys/class/leds/sys_led:red:status/brightness
I0612 00:41:46.202137  8960 LedManager.cpp:34] Programmed system LED with true
[       OK ] DataCorralServiceHwTest.FruLEDProgrammingODSCheck (4 ms)
[ RUN      ] DataCorralServiceHwTest.getCachedFruid
I0612 00:41:46.202958  8967 ThriftServer.cpp:872] Using thread manager (resource pools not enabled) on address/port [::1]:0: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
I0612 00:41:46.205275  8968 PlatformNameLib.cpp:78] Platform name read from cache: GLATH05A-64O
I0612 00:41:46.205297  8968 ConfigLib.cpp:33] Using config file: /opt/fboss/share/platform_configs/weutil.json

[       OK ] DataCorralServiceHwTest.getCachedFruid (6259 ms)
[ RUN      ] DataCorralServiceHwTest.getUncachedFruid
I0612 00:41:52.462291  8988 ThriftServer.cpp:872] Using thread manager (resource pools not enabled) on address/port [::1]:0: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
I0612 00:41:52.463197  8989 PlatformNameLib.cpp:78] Platform name read from cache: GLATH05A-64O
I0612 00:41:52.463214  8989 ConfigLib.cpp:33] Using config file: /opt/fboss/share/platform_configs/weutil.json
[       OK ] DataCorralServiceHwTest.getUncachedFruid (6324 ms)
[ RUN      ] DataCorralServiceHwTest.testThrift
I0612 00:41:58.786687  8993 ThriftServer.cpp:872] Using thread manager (resource pools not enabled) on address/port [::1]:0: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
I0612 00:41:58.787578  8994 PlatformNameLib.cpp:78] Platform name read from cache: GLATH05A-64O
I0612 00:41:58.787595  8994 ConfigLib.cpp:33] Using config file: /opt/fboss/share/platform_configs/weutil.json
[       OK ] DataCorralServiceHwTest.testThrift (6391 ms)
[----------] 5 tests from DataCorralServiceHwTest (18984 ms total)

[----------] Global test environment tear-down
[==========] 5 tests from 1 test suite ran. (18984 ms total)
[  PASSED  ] 5 tests.

led_service still fails due to fsdb dependency

I0613 22:54:00.024632 10433 Glath05a-64oLedManager.cpp:18] Created Glath05a-64o BSP LED Manager
I0613 22:54:00.024943 10433 ThriftServer.cpp:872] Using thread manager (resource pools not enabled) on address/port 5930: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
I0613 22:54:01.367779 10443 FsdbStreamClient.cpp:89] [STREAM led_service->::1] Service loop started
*** Aborted at 1749855241 (Unix time, try 'date -d @1749855241') ***
*** Signal 11 (SIGSEGV) (0x0) received by PID 10433 (pthread TID 0x7fa6d67fc640) (linux TID 10443) (code: 128), stack trace: ***
(error retrieving stack trace)

*** Check failure async stack trace: ***
*** First async stack root: 0x7fa6d67f3fc0, normal stack frame pointer holding async stack root: 0x7fa6d67f4000, return address: 0x5789ce ***
*** First async stack frame pointer: 0x7fa6c0005f38, return address: 0x5b10d7, async stack trace: ***
    @ 0000000000e7b399 _ZN5folly36resumeCoroutineWithNewAsyncStackRootENSt7__n486116coroutine_handleIvEERNS_15AsyncStackFrameE
    @ 00000000005b4c54 _ZN8facebook5fboss24ReconnectingThriftClient8setStateENS1_5StateE
    @ 000000000043042a _ZN5follyL13detached_taskEv
Segmentation fault (core dumped)

@aalamsi22
Copy link
Contributor Author

See #511

@aalamsi22 aalamsi22 closed this Aug 14, 2025
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.

2 participants