Dependent CI Retirement

ctdemato
Tera Contributor

Hello. I am newer to the ServiceNow administration, so please bear with me. I have been trying to use the CMDB Data Manager to configure the retirement of CIs and also dependent CIs. All of the plug-ins that I have read are needed were already previously installed and I have verified that both cmdb.dependent.ci.cascade.op.enabled and cmdb.dependent.ci.cascade.retire.enabled system properties are set to true. 

I have successfully created a data manager policy to retire a specific set of Windows Server CIs.  I did have a hiccup with getting the Lifecycle Stage and Stage Status to update initially. I went into the Life cycle mappings and changed the priority of the operational status legacy field maps to a larger number than the ones for the install status maps. Once I did that, the Lifecycle items changed with the changing of the legacy Install Status. I am not sure if this is the expected behavior or a bug, but I worked around that.

Now, here is the item I am having difficulty with. The retirement of the dependent CIs, like the NICs, drives, etc. I have read several threads that said that the Scheduled jobs CMDB DependentCI Policy Processor and CMDB Cascade Retire Dependent CIs jobs need to be run. I have done that several times, in addition, several days have passed where they have run on their own. In my test group, I have 7 CIs that were successfully retired using the CMDB data manager rule, and thousands more CIs that were retired manually.  After the first night (and never after I manually run the 2 tasks), there was an open policy task in the CMDB Data Manager.  I figured that maybe there is another process that needs to run, and I am missing that. When I opened the task, only 2 of the CIs that I retired had dependencies waiting to be retired in that task. I processed the cmdbtask, and the dependencies of the 2 CIs were retired as expected. Now it has been several days and there is another cmdbtask to retire the dependencies of another 1 CI, nothing for the other 4. I started poking around and somehow stumbled upon a log that had "Reset cmdb task approval flow business rule is locking the CMDBTASK0001041 during the workflow reset". That was the task with the 2 CI dependencies, so I figured the lock was the issue. I disabled that business rule for testing, and still no further tasks for dependent CI retirement.  One other point to note, I have not created any rules or policies for the dependent CIs, just using the OOB items.

I can really use some direction on things I need to look at to troubleshoot why more tasks to retire the other dependent CIs are not being created. I am thinking I have something right to get 3 to show up in tasks and function correctly.

Also, does the CMDB Data Manager need to retire the parent CI for the dependencies to be retired, or should I be seeing thousands of dependencies popping up for all of the retired CIs?

 

Sorry for the long-winded explanation and thanks in advance for any assistance you can provide.

3 REPLIES 3

Mariano Lemus
Kilo Guru

Once you put the CMDB Data Management Tasks in work in progress, then a subflow should start and complete the job for you, e.g retiring the dependent CIs or deleting the depedent CIs.

There is a business rule that does the above, I'm sure you can find it by looking at business rules running for CMDB Data Management table.

 

On the other hand there are some OOB policies, which have a field needs_review=TRUE, this makes it so that the created CMDB Data Management Tasks will require approval, once approved will move to work in progress, starting the mentioned subflow (fulfilling the retirement or deletion).

 

Find the OOB Policies looking at the table records of:  cmdb_data_management_policy

 

hope this helps, I am troubleshooting something very similar.

Cazan
Tera Contributor

Hello @ctdemato! Did you make any progress with your issue? I am experiencing the exact same thing. First i was confused because i was expecting to see 1 task/ci. Now i would want to at least see all the dependent CIs in that task, but no luck.

Many thanks!

ctdemato
Tera Contributor

I have not spent too much time on this unfortunately as I have more pressing issues to work on. However, I found that I had to set up Retirement Custom Definitions for each table of the dependent items that I wanted retired. Once I set the definition up for each one (ie.  cmdb_ci_dns_name, cmdb_ci_network_adapter, cmdb_ci_storage_device, cmdb_ci_storage_volume, etc.), the next time a main CI was retired all of those dependencies showed up on the retirement task that was generated. One task is generated for all the CIs retired since the last time it was run, but all of the dependencies are listed under the related items. We will be upgrading our test enviornment to Xanadu shortly, and I plan to revisit this after and then implement into prod.