Skip to content

Implement CM object creation on property change#4

Open
asmithakarun wants to merge 1 commit into
ibm-openbmc:mainfrom
asmithakarun:createCmObj
Open

Implement CM object creation on property change#4
asmithakarun wants to merge 1 commit into
ibm-openbmc:mainfrom
asmithakarun:createCmObj

Conversation

@asmithakarun

@asmithakarun asmithakarun commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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 "ReadyToRemove" property change:
  1. On value: false
    root@rbmc-prototype:~# busctl tree com.ibm.ConcurrentMaintenance
    └─ /com
    └─ /com/ibm
    └─ /com/ibm/concurrent_maintenance
    └─ /com/ibm/concurrent_maintenance/add

  2. On value: true
    root@rbmc-prototype:~# busctl tree com.ibm.ConcurrentMaintenance
    └─ /com
    └─ /com/ibm
    └─ /com/ibm/concurrent_maintenance
    └─ /com/ibm/concurrent_maintenance/remove

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

Comment thread src/main.cpp Outdated
Comment thread src/manager.cpp Outdated
Comment thread src/manager.cpp Outdated
Comment thread src/manager.cpp Outdated
Comment thread include/manager.hpp Outdated
Comment thread src/manager.cpp
}

// Check if a CM object already exists
if (currentCMObject)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We may need to distinguish between the active CM object and the newly requested CM object so the new object can publish an error/status before being removed right? so we need to handle it here?

@Pavithrab7

Pavithrab7 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Also here in the commit message

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.

This is correct that only one CM is allowed, but as we had discussed we would be going ahead with creation of the second object but if we see that there is a active CM in progress we return back the status of the second object as error on which the HMC will be polling on right?

@asmithakarun

Copy link
Copy Markdown
Contributor Author

CI should pass once #6 is merged

@asmithakarun

Copy link
Copy Markdown
Contributor Author

Also here in the commit message

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.

This is correct that only one CM is allowed, but as we had discussed we would be going ahead with creation of the second object but if we see that there is a active CM in progress we return back the status of the second object as error on which the HMC will be polling on right?

Hmm, guess yes. Will have to revisit this once.

Comment thread src/manager.cpp Outdated
Comment thread src/manager.cpp Outdated
Comment thread src/manager.cpp Outdated
Comment thread src/manager.cpp Outdated
Comment thread src/manager.cpp Outdated
Comment thread src/manager.cpp Outdated
@Pavithrab7

Pavithrab7 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

In the commit message - the first point in the tested section needs a change as the PR has updated to look for readyToRemove property now

@asmithakarun
asmithakarun force-pushed the createCmObj branch 2 times, most recently from 9b65928 to f4c88b1 Compare July 16, 2026 16:35
@asmithakarun

Copy link
Copy Markdown
Contributor Author

In the commit message - the first point in the tested section needs a change as the PR has updated to look for readyToRemove property now

Good catch! Done.

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 "ReadyToRemove" property change

** 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

** Note: /add or /remove object is not actually created on dbus. It will
   be included in future commits that involves creating cm object that
   implements progress interface
** When another request comes in, error will be thrown saying "CM
   operation already in progress"

Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
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.

2 participants