CMDB CI records missing but sys_id still resides on the CMDB table

keithcox
Giga Expert

Good morning,

We are running into an issue with missing cmdb ci records and wonder if anyone has seen anything like this before. 

Issue: CI records are missing from various CMDB child tables.

example- cmdb_ci_server record name=ABC does not return on search

cmdb_ci run search for name=ABC and does not return a match

cmdb run search and find the record name= ABC but when you click on the record it says Record can not be found. You can extract the sys_id but there is no longer a record.

We have looked in the deleted record table and do not find the deletion.

We have verified there is no table cleaning jobs on these tables.

We have run into this about 6 times so far this year. We have opened HI tickets but SN is not able to find any information on these records.

We have looked through BR, Script Includes, Scheduled Jobs and not able to find anything that would be deleting records.

 

My questions are:

1) Has anyone experienced an issue like this before and what was the resolution?

2) What type of action(BR, scripts etc..)  would cause this where the record is deleted but a shell still resides on the base table?

3) We have find these only when the customer complains. How would you search the cmdb to identify a record where you can find the sys_id but no record?

 

Thank You in Advance,

Keith

5 REPLIES 5

Subrahmanyam2
Giga Guru

Hi Keithcox,

There is one more way this could happen. I am not sure if you have covered that scenario.

"On Query" business rules.
Check if there are any query business rules which are adding additional conditions while querying CMDB records. If this is case then there is a possibility that record is not deleted, but when you are trying to open the record as it has to show the server record, the BR will execute and exclude that record and you may receive record not found.

In your case it looks like the query business rule may be present on the cmdb_ci table but not on cmdb table. And may be for this reason in all cmdb_ci and its child you are unable to find these records.

Please check if this helps!

 

Thanks and regards,

Subrahmanyam Satti

Hi Subrahmanyam,

Thank you for your reply. No we have not covered that scenario but will defiantly investigate it. 

Thank You Again

Hi Subrahmanyam,

I did check and we do not have any On Query Business Rules. Again that you for your response.

Hi Keith,

Please try and check if the query business rules are on all the parent tables of the "cmdb_ci_server" till the base table.

I created a query BR on cmdb table to exactly replicate the case you mentioned in OOB dev instance.
Just providing screenshots for your reference:

find_real_file.png

find_real_file.png

And through ACL's also this is possible, but you may not receive "Record not found" info message if it is ACL. If the restriction is done using read ACL's I think system will at least open form and show related lists if the ACLs are not implemented on related lists. I don't think someone took the ACL approach to hide on child tables.

One more way to find our if the record is hidden using Query BR for sure is:
Write a background script like this:

var cmRec = new GlideRecord("cmdb_ci_server");
cmRec.addQuery("sys_id", "<copy sys_id of record from cdmb list view as it is visible there>");
cmRec.setWorkflow(false); //Stop BRs before querying
cmRec.query();
if(cmRec.next()){
gs.print("Record found after querying without BRs on server table");
}

I cannot think of any other way as of now. Will get back to you if I uncover any scenario that could match your case.

--
Thanks and regards,

Subrahmanyam