Deploying a multicast image in FOG server 0.32
One of our clients is a local school with about 100 student computers. All of the student computers require the same software setup: Windows, Office, ESET Anti-virus, a few learning applications, and Google Chrome. This, of course, is the prime time when multicast computer imaging software comes into the fore.
We tried Norton Ghost a few years ago, then moved to Clonezilla for a bit, but both seemed a little clunky. Then one day, Roger found FOG. FOG is an uninventive acronym which stands for “Free Opensource Ghost”. FOG is only at version 0.32, and hasn’t been updated since 2011, but the program is really quite mature. There are a couple of misleading error messages, but overall it’s pretty good… However, when it came time to deploy images via multicast, things got pretty gnarly. That’s what this tutorial is for.
Keep in mind that this post isn’t about basic FOG server setup – there’s already plenty of help around for that. This tutorial is specifically for people who are having trouble with FOG multicast image deployments.
Before you carry on with this tutorial, you need to be in the current situation:
- You have FOG server 0.32 installed
- Unicast installations are working fine
- You want to initiate a multicast image
- You have already registered all of your target PC’s with FOG
First, make sure all of your multicast targets belong to a group. Then, go into Group Management, edit the group, and make sure all the PC’s have a default image and OS selected.
Normally, one would now go to Task Management -> List All Groups -> Deploy Multicast. In an ideal world, all the machines would start, display “please wait” until they’re all ready, then alert the server and start receiving information.
However without changes, they instead all get past the “please wait” screen, then all look like they TRY to start but receive no data.
Your Other Information -> Log Viewer will give you no helpful information at all, except for repeatedly logging:
[01-10-14 7:20:38 pm] * [01-10-14 7:20:38 pm] Checking if I am the group manager. [01-10-14 7:20:38 pm] * [01-10-14 7:20:38 pm] I am the group manager. [01-10-14 7:20:48 pm] * [01-10-14 7:20:48 pm] Checking if I am the group manager. [01-10-14 7:20:48 pm] * [01-10-14 7:20:48 pm] I am the group manager. [01-10-14 7:20:58 pm] * [01-10-14 7:20:58 pm] Checking if I am the group manager. [01-10-14 7:20:58 pm] * [01-10-14 7:20:58 pm] I am the group manager.
… every ten seconds.
Your Scheduler Log will display the even more misleading:
[01-10-14 7:20:34 pm] * [01-10-14 7:20:34 pm] Checking if I am the group manager. [01-10-14 7:20:34 pm] * [01-10-14 7:20:34 pm] I am the group manager. [01-10-14 7:20:34 pm] * [01-10-14 7:20:34 pm] No tasks found. [01-10-14 7:20:44 pm] * [01-10-14 7:20:44 pm] Checking if I am the group manager. [01-10-14 7:20:44 pm] * [01-10-14 7:20:44 pm] I am the group manager. [01-10-14 7:20:44 pm] * [01-10-14 7:20:44 pm] No tasks found.
… every ten seconds.
And your Replicator log will display the horribly error-looking-but-not-
[01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] Checking if I am the group manager. [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] I am the group manager. [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] Starting Image replication. [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] Determining my group ID number. [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] Looking up my node ID number [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] NODE ID# 1 [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] We are group ID: #1 [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] Finding group members. [01-10-14 7:14:39 pm] * [01-10-14 7:14:39 pm] I am the only member, no need to copy anything!.
… every 9.84678456 seconds. (or quite possibly ten)
If you’re checking on the status of your multicast task, eventually your “Task Progress” might sit at 2711% completion.
To resolve this issue:
- Delete all the open tasks and shut down all the patiently waiting computers.
- Edit /opt/fog/service/common/lib/MulticastTask.class.php on your FOG server:Find all instances of:
--half-duplex --ttl 32 --nokbd
And replace them with:--half-duplex --ttl 32 --nokbd --mcast-data-address 239.x.y.z
Replace “x.y.z” with the last three octets of your FOG server’s IP address. For example, my FOG server address was 10.253.0.88. Therefore I inserted –mcast-data-address 239.253.0.88.
This string occurs five times in this file – make sure you get them all.
- edit /opt/fog/service/etc/config.phpAt row 9, you will find the following:
define( "MYSQL_HOST", "" );
define( "MYSQL_DATABASE", "" );
define( "MYSQL_USERNAME", "" );
define( "MYSQL_PASSWORD", "" );Insert the appropriate data, such as:
define( "MYSQL_HOST", "localhost" );
define( "MYSQL_DATABASE", "fog" );
define( "MYSQL_USERNAME", "root" );
define( "MYSQL_PASSWORD", "MyAwesomeRootPassword" );Note the FOG installation manual suggests a blank root password. I did not follow this advice, because there were other databases within the MySQL instance and I didn’t want a blank root password.
- Edit /var/www/fog/commons/config.phpAt about line 50, you will find:
define( "MYSQL_HOST", "localhost" );
define( "MYSQL_DATABASE", "fog" );
define( "MYSQL_USERNAME", "root" );
define( "MYSQL_PASSWORD", "" );Confirm those settings are correct. If you have assigned a password to your MySQL root user, you must enter it in the MYSQL_PASSWORD definition above (line 53)
That should be enough to sort out FOG’s multicast. At this stage I rebooted the FOG server, but it would probably have been enough to simply restart the Apache service. After that, log into FOG and try to create another multicast task – the deployment should go ahead without a hitch!
Ross Knudsen
February 5, 2014 @ 12:09 pm
I had an issue with UDPCast not being built correctly as part of the installation script. I found this page which details how to fix:
Setting up and building UDPCast…Failed!
Eric Light
February 5, 2014 @ 1:24 pm
Thanks Ross!