Implement CM object creation on property change#4
Conversation
| } | ||
|
|
||
| // Check if a CM object already exists | ||
| if (currentCMObject) |
There was a problem hiding this comment.
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?
|
Also here in the commit message
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? |
|
CI should pass once #6 is merged |
Hmm, guess yes. Will have to revisit this once. |
3c27d13 to
df50c49
Compare
|
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 |
9b65928 to
f4c88b1
Compare
Good catch! Done. |
f4c88b1 to
d39b63d
Compare
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>
d39b63d to
bc04b42
Compare
Add support for creating concurrent maintenance dbus object based on ReadyToRemove property change signal on inventory items.
Key changes:
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:
On value: false
root@rbmc-prototype:~# busctl tree com.ibm.ConcurrentMaintenance
└─ /com
└─ /com/ibm
└─ /com/ibm/concurrent_maintenance
└─ /com/ibm/concurrent_maintenance/add
On value: true
root@rbmc-prototype:~# 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"