What specifically does the message "Couldn't find Relationship with 'id'=########" mean?


#1

I am researching a problem where the error message “Couldn’t find Relationship with ‘id’=############” occurs many times with the same # and with other numbers as well. These generally are generated either during an ems refresh or when scheduling a C&U collection. I am trying to understand if the ‘id’ value represents the key of the relationships instance or a vm or something else entirely and I am anticipating the need to correct this problem in a production database. Any insights?


#2

@gmccullough can you review this question from @tch and forward to a SME if necessary.


#3

It appears that this is a known but uncommon problem generally resulting from a partial ems refresh for a provider in which the relationship tree is not completely populated. There is a ruby script in the tools directory which examines all of the relationship instances, removing those in error and then schedules a full ems refresh to correct those partial or incomplete updates in need of rebuilding.

command line commands to execute:
cd /var/www/miq/vmdb
rails r tools/fix_vm_relationships.rb

as at least one log line will be generated for each relationship instance examined, it might be a good idea to redirect the stdout to a file so that it can be reviewed later.