Multicast min-receivers
-
When we try to multicast an image to a group, it seems it doesn’t start the process until all the computers in the group have connected.
What happens? Sometimes our computer labs have PCs out of order and you have to deploy an image. If you send the multicast task, it doesn’t start and sits in the Please Wait screen waiting for that computer that doesn’t boot.
I suppose that this can be tweaked in /opt/fog/service/common/lib/MulticastTask.class.php, changing the $this->getClientCount() for an static number of minimum hosts.
I have a couple questions about the process. Let’s say that I want to deploy 19 PCs and set the min-receivers parameter to 15. Supposedly it will start once it reaches 15 PCs, but what about the remaining 4 PCs?
Will they join the same multicast session?
Will the stay out?
Will they wait until the first 15 PCs finish? -
From the [URL=‘http://www.udpcast.linux.lu/cmd.html’]UDPCast[/URL] command line options:
[QUOTE]–min-receivers [I]n[/I]
Automatically start as soon as a minimal number of receivers have connected.–min-wait [I]t[/I]
Even when the necessary amount of receivers [I]do[/I] have connected, still wait until [I]t[/I] seconds since first receiver connection have passed.[/QUOTE] -
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.
-
[quote=“YuYo, post: 12476, member: 3300”]
I have a couple questions about the process. Let’s say that I want to deploy 19 PCs and set the min-receivers parameter to 15. Supposedly it will start once it reaches 15 PCs, but what about the remaining 4 PCs?Will they join the same multicast session?
Will the stay out?
Will they wait until the first 15 PCs finish?[/quote][B]*Will they join the same multicast session?[/B]
Generally no.
[B]*Will the stay out?[/B]
Probably, they will be stay out of the multicast session.
[B]Will they wait until the first 15 PCs finish?[/B]
No. Generally, they will be stay in the blue screen “Please Wait” and finally, I think, appears a stdio error message.