Skip to content

[Nexthop][bugfix] Clear stale CPLD sysfs attrs before create on platform_manager restart - #1695

Open
andrew-nexthop wants to merge 1 commit into
meta:mainfrom
nexthop-ai:stale_cpld_sysfs_attrs
Open

andrew-nexthop wants to merge 1 commit into
meta:mainfrom
nexthop-ai:stale_cpld_sysfs_attrs

Conversation

@andrew-nexthop

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Restarting platform_manager leaves the previous run's dynamic CPLD sysfs attributes in place (fbcpld_generic driver state outlives the restart), so every CREATE ioctl logs "attr ... already exists" kernel errors. Issue FBCPLD_IOC_SYSFS_DESTROY_ALL before CREATE in createCpldSysfsAttrs so restarts are clean and idempotent, including after an unclean shutdown.

Test Plan

  • Reproduced: systemctl restart platform_manager logs 13 "attr ... already exists" errors on fbcpld_generic 18-0060.
  • Verified FBCPLD_IOC_SYSFS_DESTROY_ALL on the live device removes all dynamic attrs and leaves the static fw_ver untouched.
  • With the fix, restart recreates all attrs with no kernel errors.

…ger restart

Signed-off-by: andrew-nexthop <andrew@nexthop.ai>
@andrew-nexthop
andrew-nexthop requested a review from a team as a code owner September 30, 2026 20:51
@meta-cla meta-cla Bot added the CLA Signed label Sep 30, 2026
@andrew-nexthop andrew-nexthop changed the title [Nexthop] Clear stale CPLD sysfs attrs before create on platform_manager restart [Nexthop][bugfix] Clear stale CPLD sysfs attrs before create on platform_manager restart Oct 29, 2026
@github-actions github-actions Bot added the project:bugfix FBOSS project: bugfix label Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant