Subnet Groups Plugin does not seem to work
-
The Subnet Groups Plugin does not seem to work on 1.5.10.41. See setting below. Not sure what is missing.
Group memberships are still 0. We are actively adding new hosts since this plugin was added.
Thanks!
Mat
-
@MatMurdock I don’t know that it works exactly as you might expect (magically and all that jazz lol)
I believe it relied on the IP address of the host table which just isn’t used anymore by FOG. While the plugin could still “work” you’d have to, I think, do so by setting the IP of the host and having the valid hostname dns translation, or the IP column of the host is set to the IP (this does not happen automatically of course. - Maybe we could add it back and set it as it boots up and gets IP addresses, but this could change A LOT.)
So from what I can see of the working-1.6 method, it does it at FOG Client Checkin, or when it hits the IPXE menu validly (since the IP of the host could potentially change at any given point.
I cannot say I ever had the change to test this plugin though. Somebody else came up with it, I just wrote the underlying bits and bobs so to speak (after they provided what they could of it) and updated it to function from a UI perspective in working-1.6
Theoretically it should work out the box, but I do not know for sure. Apologies on missing that.
I have improved a big of the cidr checking logic so it will now check for valid IP addresses as well (So no 256.0.0.399/23 potentials lol)
I don’t know if it ever worked as intended or not as not really had too many people using it until you and one person back in 2021 it seemed (and hopefully/likely the person who needed and came up with the concept.)
-
@Tom-Elliott. Gotcha… Magic is fun though! So are you thinking that in 1.6 this may work as fog updates the host record based on information submitted from the FOG client?
Mat
-
@MatMurdock Honestly, I don’t know. I’m just looking at the plugin from the view of 1.6 so that’s the base knowledge I’m aware of. I am not looking through the lens of the dev-branch options, though pretty sure it works rather similarly.
It may work, it may not, but If you’r’e willing to work with me, (“this works, this made things borked worse, this made things worked better” etc I’m willing to listen and try things.)
Probing questions and all that. I want it to work for you (and others) and as expected so please let me know.
-
@Tom-Elliott Sounds good. I will do an install in my lab this week. BTW, do you know if the last IP of a host is stored in the DB? If so what table. Is there a database schema document available? Do you know the table name that associates the hosts and groups?
Mat
-
OK. I wrote a trigger that will pull the IP of the client from the history table and add the host to appropriate group based on the subnetgroup table. To test I exported my history table, truncated it and reimported the records with the trigger in place. Seemed to do the job. Files are attached if anyone wants them.
Mat
-
hello, i’m the original author of the Subnet Groups plugin: I wrote and committed the first version of its code back in 2019 (https://github.com/FOGProject/fogproject/pull/289).
i just wanted to inform you that in our environment (currently equipped with the last stable version of FOG) everything is working alright, we never had issues with the plugin even though we are used to update our systems on a regular basis.
as @Tom-Elliott mentioned, problems might arise due to incorrect IP addresses mapping: on our system, we had to set up a dynamic DNS server which has the job to automatically keep track of the actual host IPs based on their hostname; without this (or some alternative solution to correcly associate IPs with hosts) the plugin is not going to work properly.
best regards.