First, you should know how works FOG when you create a multicast task and the different elements involved :
[B]In the webUI:[/B]
What happend when you make click in the “download multicast tasks” button:
The php script create a “Image Package Multicast”: the script make a query to know how much computers are in the group, and create a multicast task entry in the multicastSession table (create the multicast session ID, the session port and the initial state:0 or Queue). Then, creates as many tasks as computers are in the group, and create their differents “image Package”. Those “image Package” create the PXE files and the differents registry in the tasks table. The initial state for thos tasks is 0 or Queued. And send the WOL package to the clients.
Well, we have the PXE files and the entries in the database; but what happend in the server?
[B]In the server:[/B]
We have a daemon which controls the multicast tasks, concretely we have four differents daemons, the FOGMulticastManager. This daemon queries each 10 seconds if there is a new multicast tasks. If the daemon find one, makes a query to know the session ID, how much computers and which are the image files. Then create a UPDCast command like this:
[CODE]CMD: /usr/local/sbin/udp-sender --file “/images/my_image_folder/d1p1.img” --min-receivers 20 --portbase 63142 --interface eth0 --max-wait 300 --half-duplex --ttl 32 --nokbd --mcast-data-address 239.0.104.22 --start-timeout 3600;[/CODE]
Then make an update in the database to write the new state of the multicast session. Multicast session state is 1 or In Progress. And begin to log the multicast activity in /opt/fog/log/multicast.log.udpcast.NUMBER_SESSION. The sesion have two timeouts: --max-wait 300 and --start-timeout 3600. The second one indicates how long will be activate a session before the server deletes it. If any hosts is turned on during this hour, the server will kill the session.
The min-receivers parameter indicates that the server will be waiting to 20 clients; when this magic number is reached, the session will begin, and any other computer comes after, will be out of the session (in the famous blue screen “Please Wait”).
What happend if you send a multicast session to 20 clients, and only 17 will be turn on? In this situation, the multicast session will be waiting 300 seconds, max-wait parameter, after this the session will begin for 17 clients. The other tree clients will be out of session. Remember, you have one multicast session for each image file.
When the multicast session finishes, the FOGMulticastManager, update the sesson state to 2 or Finish and kill the UDPCast process in the server.