Skip to content

Commit 895eeac

Browse files
Mount /var/lock/pddf-locks in pmon (#23128)
Why I did it In PR#22684 we added locking to the pddf led API. However, the lock is not being shared between the pmon container and the host. As a result, we have not completely eliminated these errors [ 3919.694550] PDDF_LED ERROR find_led_ops_data invalid index: 2 for type:PSU_LED;1 [ 3919.702819] ERROR get_status_led: Cannot find LED Ptr [ 7422.178164] PDDF_LED ERROR find_led_ops_data invalid index: 1 for type:SYS_LED;0 [ 7422.186449] PDDF_LED ERROR get_status_led: Cannot find LED Ptr Work item tracking Microsoft ADO (number only): How I did it Mount the file lock directory (/var/lock/pddf-locks) in the pmon container. Add an intermediate directory pddf-locks so that pmon doesn't need to mount all of /var/lock. How to verify it Confirmed the path is mounted in pmon now. No regressions in LED control.
1 parent 0cb6251 commit 895eeac

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddfapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
bmc_cache = {}
1414
cache = {}
1515
SONIC_CFGGEN_PATH = '/usr/local/bin/sonic-cfggen'
16-
LED_CTRL_LOCK_PATH = '/var/lock/pddf-api-led.lock'
16+
LED_CTRL_LOCK_PATH = '/var/lock/pddf-locks/pddf-api-led.lock'
1717
HWSKU_KEY = 'DEVICE_METADATA.localhost.hwsku'
1818
PLATFORM_KEY = 'DEVICE_METADATA.localhost.platform'
1919

rules/docker-platform-monitor.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ $(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /host/reboot-cause:/host/reboot-cause:r
5757
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /host/pmon/stormond:/usr/share/stormond:rw
5858
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /var/run/platform_cache:/var/run/platform_cache:ro
5959
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /usr/share/sonic/device/pddf:/usr/share/sonic/device/pddf:ro
60+
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /var/lock/pddf-locks:/var/lock/pddf-locks:rw
6061
# Add sysfs mounts for hardware access
6162
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /sys/:/sys/:rw
6263

0 commit comments

Comments
 (0)