FOG 1.5.6: Changing host MAC address can make hosts inaccessable
-
So basically, do this:
Create at least two hosts with different MAC addresses. Save this stuff.
Now edit one of the hosts and add the MAC address from the other host to this one.
The original host will stop appearing in your host list after doing this. You cannot recreate or edit the host, it’s stuck in limbo, with no mac address. There’s no way to get it back. And you can’t use the same name because it’ll complain that host already exists.
The only way I could fix this was to jump on to my fog server, fire up mysql client and remove the record for that host by hand.
Might wanna fix that. Great software otherwise.
Also another suggestion: Make this stuff work on a multi-homed server. That would be really great.
I do not need support for this issue. This is a bug report. I will not be following this thread in any way shape or form.
-
[Mod note] Moved to bug reports forum
-
Sure this can be unexpected though I don’t fully understand. Not that I don’t understand the reason this could be an issue, per se.
First why would you need to create two hosts and use one of those hosts Mac on another host?
This should be relatively easy to address but I really don’t understand how/why someone would do this. Create two hosts, then assign the Mac of one of those hosts to the other. Or more specifically, the primary Mac of one of the hosts being assigned to another already defined and primary Mac having host.
-
It wasn’t something I wanted to do, it was something I did by mistake.
I was just pointing out it is a flaw in the software, it should be possible to get at the mac-address-less host to fix it or delete it.
-
@Cheetah2003 in working-1.6 this was already addressed though I may rethink how to work it. This is somewhat easier for the 1.6 side as the pages and elements are much more modularized.
-
@Cheetah2003 Just in case you come along this alter on and wonder. While you are right that it’s not great that this can happen I reckon it’s very rarely the case anyway. We have highly generalized SQL queries that do the table updates (like adding the MAC) and it’s not easy to think about just any situations where people do strange things.
We have database maintenance commands in the wiki which do clear the problem if you have created it: https://wiki.fogproject.org/wiki/index.php/Troubleshoot_MySQL#Database_Maintenance_Commands
.... DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC`); ...
This line will clean out the lost/hidden) host entry for you.
Also another suggestion: Make this stuff work on a multi-homed server. That would be really great.
There are so many different scenarios around that it’s nearly impossible to make this generally possible. People would use this with different subnets across routers, also use VLANs and all that. So I think if we add multi-homing for one specific scenario we make three people happy but still while putting in a lot of work this won’t work for the other 20 guys wanting a kind of different multi-homed setup.
We don’t encourage people to do multi-homed but still we try to help people set this up under some circumstances.
-
@Cheetah2003 Have you tried to “Reset Encryption Data” after you update the MAC? List “all hosts”, click on the one MAC is changes, the select “Reset Encryption Data”.
-
@Cheetah2003 I know it’s been a long time. Sorry this has gone lost! I only got to look into this and fixed it.