Delete an assigment for a deleted CI

  • KM03584549
  • 31-Jan-2020
  • 11-May-2021

Summary

Unable to delete a policy template, get error that says that is assigned to a CI that no longer exists

Question

When trying to delete a policy template, the OBM system will not allow the deletion of the same if it is assigned to a CI.

Answer

First is needed to remove the assignment from the OBM system if exists

This can be done by going to Administration / Monitoring / Policy Templates, locate the template that will be deleted and select the "list assignments of the selected item."

This will return a list of all CIs that have that template assigned, here we can remove the assignment by selecting the corresponding CI and using the delete option.

In case that the CI was deleted/removed from RTSM and doesn't show on the assignment list is needed to delete this assignments from the database.

2018.11 added a JMX method to perform clean up of the deleted Ci assignments.

removeCleanupAssignmentsOfDeletedCIs

  • Access the JMX console https://<OBM_FQDN>:29000 
  • locate the com.hp.opr.config section
  • Access the MBean: com.hp.opr.config:name=AssignmentCleanupMBean
  • invoke the method: removeCleanupAssignmentsOfDeletedCIs
    • First use the testRun = true, to get a list of what will be deleted
    • Then set the testRun = false, for the changes to be persistent
  • After that, the assignments should be deleted, and allow to delete the template