We are not able to create an ICMP group profile using an old profile name. The ICMP profiles are in delete state when we do the re-IP process for the Hub YY. Please let us know the exact steps that we should follow during IP change for a HUB.
Error: com.ca.uim.mcs.api.exception.ServerErrorException: ERROR_DUPLICATE_PROFILES []
This issue started occurring when the customer decommissioned (re-IP process for the Hub YY) Hub YY and renamed Hub XX to Hub YY and used the same name (HubYY ICMP).
The profiles which are not being removed even though their state is 'Delete' (SSRV2Profile) is because of the associated device(poller-362901) that does not exist in the system(SSRV2Device table) and hence this was causing the issue. Ideally dependent profiles should get deleted first and then the device/hub should get deleted next from the OC by renaming the hub/delete any device from the inventory.
Note: The fix for this issue will be included in UIM Server 23.4 - Cumulative Update 4. ICMP profiles associated with the device will be deleted when the robot/hub hosting the ICMP profile is deleted from the OC Inventory
To identify the issue from the DB, we can run the query below:
exec sp_executesql N'select p.*, (select a.foreach_variable from SSRV2Profile a where a.profileId=p.ancestorprofile)
as ancestor_foreach_variable from SSRv2Profile p where group_id=@P0 AND profileName=@P1 AND template=@P2',N'@P0 int,@P1 nvarchar(4000),@P2 int',6796,N'HubYY ICMP',2395
Resolution 1:
There are 3 steps we need to perform to resolve the issue.
#1: Cleanup the Delete status records
#2: Recreate the profile with the original name (HubYY ICMP).
#3: Once #2 is working as expected then delete the existing temporarily created profile ('Hub YY ICMP' (there is an extra space between Hub YY)
#1 Cleanup the Delete status records:
Took a backup of the following tables.
select * into SSRV2ProfileCheckSum_29_oct_24 from SSRV2ProfileCheckSum--90329
select * into SSRV2ConfigValue_29_oct_24 from SSRV2ConfigValue--2082796
select * into SSRv2Profile_29_oct_24 from SSRv2Profile--91068
select * into SSRV2Device_29_oct_24 from SSRV2Device--10807
select * into SSRV2AuditTrail_29_oct_24 from SSRV2AuditTrail--768859
Ran queries to identify how many records are there in the profile(HubYY ICMP) table and dependent tables:
select * from SSRV2ConfigValue where profile in (select profileId from SSRV2Profile
where profileName in ('HubYY ICMP') and poller=362901 and template=2395 and status='delete')--3380
select * from SSRV2ProfileCheckSum
where profile in (select profileId from SSRv2Profile
where profileName in ('HubYY ICMP') and poller=362901 and template=2395 and status='delete')--39
select * from SSRv2Profile
where profileName in ('HubYY ICMP') and poller=362901 and template=2395 and status='delete'--41
Ran queries to delete the profile (HubYY ICMP) from the table and dependent tables associated to that profile:
#1:
BEGIN TRANSACTION;
delete from SSRV2ConfigValue where profile in (select profileId from SSRv2Profile where
profileName in ('HubYY ICMP') and poller=362901 and template=2395 and status='delete')--644
COMMIT TRANSACTION;
ROLLBACK TRANSACTION;
#2:
BEGIN TRANSACTION;
delete from SSRV2ProfileCheckSum where profile in (select profileId from SSRv2Profile where
profileName in ('HubYY ICMP') and poller=362901 and template=2395 and status='delete')
COMMIT TRANSACTION;
ROLLBACK TRANSACTION;
#3:
BEGIN TRANSACTION;
delete from SSRv2Profile where
profileName in ('HubYY ICMP') and poller=362901 and template=2395 and status='delete'
COMMIT TRANSACTION;
ROLLBACK TRANSACTION;
#2: Recreated the profile with the original name(HubYY ICMP) and was able to create it.
#3: Deleted the existing temporarily created profile('Hub YY ICMP' (there is an extra space between Hub YY)
Customer confirmed that everything is now working as expected.
Resolution 2:
1. Created the same group with a different name under the same Container and validated the members list
2. Deleted the Group from OC
3. Waited around five minutes confirmed that the orphaned profiles were deleted from the ssrv2profile table
4. Renamed the Group to the original name
5. Deployed the ICMP Setup (Enhanced) profile to <NEWSYSTEM>
6. Updated the icmp from 1.29 to 1.29T1
7. Deployed ICMP Remote Monitoring (Enhanced) to the Group
8. Validated that profiles were in the process of being deployed