Feature request: a way to handle USB Ethernet adapters shared between many hosts
-
Hi all, and thanks for FOG.
We run it in a school (about 280 hosts, FOG 1.6.0.14) and we have a problem that I think many schools with laptops share. A lot of our laptops have no Ethernet port, so for imaging we plug in a USB Ethernet adapter and PXE boot from it. The same few adapters get moved from laptop to laptop, and since FOG identifies a host by the MAC it boots with, it always sees the adapter’s MAC and therefore always the same host.
What we do today is move that MAC by hand: delete it from the previous host, add it to the laptop we are about to image, and mark it as primary. It works, but it is easy to forget a step. If the MAC stays on two hosts,
getHostByMacAddressesfalls back on the primary flag, and if that does not settle it, the log shows multiple hosts.The ignore flags don’t help either. From what I read in
parseMacList(I might be wrong), IMI / IMC are looked up across all the rows with that MAC, not per host, so marking the adapter as ignored for imaging on one host hides it for everybody, including the laptop you actually want to image.What would make this much easier is some way to tell FOG that a MAC belongs to a shared or removable adapter. When a MAC flagged like that PXE boots, FOG would not bind it to a fixed host, but let you choose the host at boot (a list of hosts that have a task queued, or typing a hostname), or pick the one that has a pending task. Another option would be to let a task carry the MAC it should be matched with, only for that task, so you could schedule the deploy for the laptop with the adapter’s MAC and nothing else would need to change in the host.
Another way to look at it, which might be simpler to build: let us define a MAC as an installation MAC (or “multi-host” MAC), one that is allowed to be linked to a host only for the duration of a task. You would attach it to the laptop you are about to image, run the deploy or capture, and when the task finishes FOG would detach it automatically, so it is free for the next machine and never ends up on two hosts at once. That would also remove the need for the ignore flags in this case, since the MAC would only live on a host while a task is running.
I’m happy to test anything on our side. And if there is already a recommended way to handle shared USB adapters that I have missed, I’d be glad to hear it.