Skip to content

CM: Add FRU type identification from paths#8

Open
RameshaR45 wants to merge 7 commits into
ibm-openbmc:mainfrom
RameshaR45:fru-detection-pr
Open

CM: Add FRU type identification from paths#8
RameshaR45 wants to merge 7 commits into
ibm-openbmc:mainfrom
RameshaR45:fru-detection-pr

Conversation

@RameshaR45

Copy link
Copy Markdown

Dependencies

This PR depends on PR #4 (Implement CM object creation on property change)

This PR adds FRU type identification capability on top of the CM object infrastructure introduced in PR #4. The PR diff includes changes from PR #4 until it is merged. Once PR #4 is merged, this PR will automatically show only the FRU detection changes.

asmithakarun and others added 7 commits July 1, 2026 03:06
Added asmitk01@in.ibm.com as an owner and reviewer of the
repository.
Also added OpenBMC community information for the maintainers.

Entries are kept in alphabetical order.

Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Add support for creating concurrent maintenance dbus object based on
ReadyToRemove property change signal on inventory items.

Key changes:
- Added CMObject class to represent concurrent maintenance operations
- Implemented ReadyToRemove property change signal monitoring
- Create /com/ibm/concurrent_maintenance/remove when a FRU is needed
  to be concurrently replaced
- Create /com/ibm/concurrent_maintenance/add when a FRU is added back

Only one CM operation can be done at a time. If an operation is already
in progress, new requests are rejected with an error log.

Note:
The CMObject class is currently a placeholder with TODO comments for
future Progress interface implementation. When the Progress interface is
added, it will track CM operation progress status of the FRU and
completion time.

Tested By:

* Verified the CM object creation on property change
  (As of now, its listening on Available property change signals from
   inventory dbus objects for testing purposes. This will change to
   "ReadyToRemove" once the backend has changes):

** On value: false
busctl tree com.ibm.ConcurrentMaintenance
└─ /com
 └─ /com/ibm
  └─ /com/ibm/concurrent_maintenance
   └─ /com/ibm/concurrent_maintenance/add

** On value: true
busctl tree com.ibm.ConcurrentMaintenance
└─ /com
 └─ /com/ibm
  └─ /com/ibm/concurrent_maintenance
   └─ /com/ibm/concurrent_maintenance/remove

** When another request comes in, error will be thrown saying "CM
operation already in progress"

Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Add generic API to parse FRU object paths from inventory manager
and identify FRU type (FSI, BMC, Switchboard, etc.). The API
takes object path as input and returns the FRU type as output.

Signed-off-by: Ramesha Rohit <ramesharohit45@gmail.com>
@jenkins-openbmc-ibm

Copy link
Copy Markdown

Can one of the admins verify this patch?

Comment thread src/manager.cpp

lg2::info("CM object created at {PATH}", "PATH", cmObjectPath);
lg2::info("CM object created at {PATH} for {TYPE} FRU",
"PATH", cmObjectPath, "TYPE", fruTypeStr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On rebasing, cmObjectPath will change to currentCMObject->getPath()

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants