SOLVED Client with too many mac addresses

  • Hey All,

    I am having an issue where one of my clients has too many mac addresses, yet I can’t see them in the FOG anywhere. I am looking for a command in mysql to delete mac addresses from a particular host. I am on version 1.4.4.

    I would be grateful for any help someone could provide!


  • @wayne-workman This fixed it! Thank you!

  • @tom-elliott I am not quite sure what was wrong. I was working with someone else here on the forums on trying to do the automation and he had me run a script on mysql which ended up messing up a few things (accident). I was trying to work with the persistent groups piece. I ended up having to do a restore of the FOG server and that’s when the issues happened. I think I just had some duplicate entries somehow once I did the restore.

    I look forward to a new GUI layout! You guys are rock stars!

  • Senior Developer

    @wayne-workman What is being flagged about this posting? I don’t see how it is spam in anyway shape or form.

    @Chris-Whiteley Can you explain in detail what was wrong?

    I’ve not heard of DB Cleanup ever being needed for mac address issues, unless macs are registered to a “hostID” of 0. This was very rare even when things were all screwed up back in the 1.3.x series.

    I’m aware of potential pitfalls for 1.5.0 and earlier with regards to random adding of things (Adding a host to a group might add all hosts or some set of random hosts) but not aware of any problems beyond this.

    What command fixed it? Was it simply run and it worked?

    Based on the with too many mac addresses, it would seem to me that this was related to additional and / or pending macs issue (though I’m not sure which.)

    As we are working on another new GUI layout (one that I feel is 900% better looking a designed than the 1.5.0 GUI is) our work for 1.5.0 GUI was mostly a baseline to get responsive designed pages, with more dynamic information.

  • @wayne-workman This fixed it! Thank you!

  • I smell the xy problem. It’s possible there are problematic/incorrect entries in the database that is causing this. Running these database maintenance commands might fix it:

  • Senior Developer

    Okay so the problem is the new GUI then. I haven’t figured out a nice method of displaying host mac’s beyond the primary. I’m thinking about adding a new “tab” that handles host mac addresses, but I haven’t figured out a good method to approach this quite yet.

    In the mean time, the fog database table that would have your hosts mac addresses would be under:

    SELECT * FROM hostMAC WHERE hmHostID='<id of host with multiple macs>'

    Of course change the <id of host with multiple macs> portion appropriately.

    So I will work to add the mac address listing for 1.5.1 as well as a means to approve pending macs for the host.

  • @tom-elliott There are no pending macs in the “Pending Mac List”. There is an issue where this one machine has multiple mac addresses assigned to it and I can’t see them anywhere.

  • Senior Developer

    @chris-whiteley you goto for reoorts, pending mac addresses. I know not intuitive.

  • So I maybe didn’t word this correctly. In FOG I show only one Mac Address for this host. When FOG checks in on the client machine, it shows 3 Mac addresses. I need to find out where these 2 extras are in the database and delete them.

  • Instead of deleting the MACs you could go into the management portal and enter the MAC address which should update the MAC address for that host.

    If you still wish to do a deletion of the MAC addresses and you know the id of the host you’re trying to delete the MACs for then simply do:

    sudo mysql
    use fog;
    delete from hostMAC where(hmHostID = theIDfortheHost);

    Where theIDfortheHost is obviously the known ID. If you don’t know the hostID then do:

    select hostID from hosts where(hostname = ‘theNameFortheHostMachine’);

    This will grab the hostID to use for the deletion command.