A select few hosts will no longer register after being removed from FOG previously
Recently I’ve come across a few systems that will not register properly no matter how I try (full registration, quick registration, via the FMC). My suspicion is that they weren’t removed from FOG properly (they were just removed from an area). The registration issues only occur on these select few machines. Here is the error I’m seeing in the apache2 error logs:
PHP Fatal error: Call to a member function get() on a non-object in /car/www/fog/Host.class.php on line 486
I’ve tried manually deleting the hosts from the hosts table in mysql using both the hostName (old and new) and hostID but neither have done the trick. Any help would be greatly appreciated.
(For the record we’re on SVN2868, I know we’re way behind but upgrades haven’t been in order of late. I’m pretty sure it’s not a version thing in this case however.)
@Wayne-Workman This absolutely worked like a charm. Found that MAC was still in the hostMAC table, deleted it, and Bob’s your uncle. Really appreciate it Wayne! I’d love to update to the latest SVN but we’re in the middle of our busy time building and deploying images so it will likely have to wait until the fall. Thanks again!
(ie select * from hosts where hosts.hostID = ‘MACGoesHere’; returns Empty set)
select * from hostMAC where hostMAC.hmMAC='00:25:11:a2:a9:5d';
That’s how you search by MAC address.
@Jacob-Gallant … I’d say svn up, buddy… Maybe the problem was resolved 500 revisions ago? We don’t know till you update.
I should have been more clear, it appears like those hosts are being added into the DB fine. Even when I delete all traces of the particular host I’m testing (ie select * from hosts where hosts.hostID = ‘MACGoesHere’; returns Empty set) and I try to register the host, it will not show up in FMC. It is adding to the DB but not available to do anything with it in the FMC.
you can type
mysql use fog select * from hosts where hosts.hostName = 'NameGoesHere';
the quotes around the ‘name’ stay.
you can do something similar to search by the MAC address.
select * from hostMAC where hostMAC.hmHostID = 165;
Or some other host ID number…
Once you figure out where the data is that’s lingering, you can just delete it.