Skip to content

[Mellanox] Added inotify mechanism for vpd_data file creation#25879

Open
zili11720 wants to merge 3 commits intosonic-net:masterfrom
zili11720:inotify_for_vpd_data
Open

[Mellanox] Added inotify mechanism for vpd_data file creation#25879
zili11720 wants to merge 3 commits intosonic-net:masterfrom
zili11720:inotify_for_vpd_data

Conversation

@zili11720
Copy link
Contributor

Why I did it

This fixes a race condition bug where chassis.py attempts to access the VPD data file before it's available during system initialization. When the file doesn't exist yet, _parse_vpd_data() returns an empty dictionary, causing the revision field to be populated with "N/A" in Redis instead of the actual hardware revision value.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Update _parse_vpd_data() to use inotify mechanism to wait for VPD data file generation
before accessing it.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Zili Bombach <zbombach@nvidia.com>
Signed-off-by: Zili Bombach <zbombach@nvidia.com>
Signed-off-by: Zili Bombach <zbombach@nvidia.com>
@zili11720 zili11720 requested a review from lguohan as a code owner March 4, 2026 07:48
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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