Foreman-host-check.rb saying 'host's VM [uuid] is missing' -- a LOT

Problem:

We had a catastrophic filesystem failure on our Foreman host, and had to restore from backups (for the FS, and separately for the DB). This has left things in a weird state.

Before the failure, the /usr/local/sbin/foreman-host-check.rb script (the provenance of which I don’t know) was, and now still is, reporting many dozens of issues like this (many per email message):

------------------------
Host with mismatching VM
------------------------
*<fqdn>*
owner => *<user>*
status => the host's VM [57f57809-5900-4057-9c88-ed15ad7319ce] is missing

I don’t know what this means, although I suspect it indicates that the Foreman and RHEV records are out of sync and need to be reconciliated.

Expected outcome:

I dunno, no error messages?

Foreman and Proxy versions:

1.11.4

Foreman and Proxy plugin versions:

Dunno.

Other relevant data:

We’ve had some Foreman VM become undeletable because of ActiveRecord::RecordNotFound and Puppet CA cert issues; I don’t know if that’s related, but we’re having to delete them manually by disassociating them from their orgs.

This script is not ours, can you paste-bin it? Not sure if we are able to help tho.

It definitely looks like a local script, so I won’t waste anyone else’s time trying to figure it out or debugging it. Thanks anyway!

1 Like