Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes
-
@Tom-Elliott YAY! that seems to have fixed the issue at Adamsville location! I will test my other locations and let you know if everything is 10/10.
-
@FlareImp Great, thank you for testing it.
Both fixes are now in dev-branch. Run
updatefog.sh --branch dev-branchagain on the main server to get them:- The MAC tab shows the primary MAC as selected.
- A location whose Storage Group has no nodes no longer stops the PXE boot. FOG uses its own node and writes one line to the error log that names the location.
Let me know how the other sites do, and whether the deploys spread across the nodes.
-
@Tom-Elliott Per the original post, I was able to image 12 of the computer at the Adamsville location. 10 of them kicked off using the Master node but the other two sat in the que rather than moving to one of the other two free nodes.
-
@FlareImp Thanks. That should not happen on 1.6.0.181: when a host PXE boots and the master already has 10 tasks, the host should get a free node in the same group. I ran the same setup on my lab, 12 hosts with Max Clients 10, booted one at a time and all at once. Every time, the extra hosts moved to the free node.
When FOG looks for a free node, it skips a node without a message if any of these is true:
- The node is not enabled, or its Max Clients is 0.
- The node is not in the location’s Storage Group.
- The main server cannot reach the node. FOG tests the node’s SSH port (22 unless you changed it) first, then port 443 (or 80 if you use http).
Please check these for the Adamsville storage group:
- In Storage Node Management, for each of the three nodes: Storage Group, Is Enabled, Is Master Node, Max Clients.
- In Location Management, for that location: Storage Group and Storage Node.
- On the main server, run this for each of the two other nodes (replace the IP):
nc -zv -w 1 <node-ip> 22; nc -zv -w 1 <node-ip> 443; nc -zv -w 1 <node-ip> 80If all three fail for a node, FOG treats that node as offline, and that is why the hosts stayed in the queue.
-
@Tom-Elliott
In Storage Node Management, everything is set correctly.
in Location Management, everything is set correctly.
On the main server, all 3 nodes at Adamsville location passed their checks. -
After updating dev-branch 1.6.0.188 with the fixes you listed above. I noticed that my replication logs on all nodes (Master and Slave) are reading everything as:
[11-18-26 4:14:16 pm] * We are group ID: 1. We are group name: default [11-18-26 4:14:16 pm] * We are node ID: 1. We are node name: DefaultMember [11-18-26 4:14:16 pm] * Attempting to perform Group -> Group image replication. [11-18-26 4:14:16 pm] | There are no images available!.Nothing has changed in my settings so everything is still a member of its own induvial locations.
-
@FlareImp Thanks for checking all of that. With those settings, the two hosts should have moved, and I cannot make my lab hold them back. So I need FOG to tell us why.
Until now, when a host could not move, FOG wrote nothing about the reason. I added a log line for that case: https://github.com/FOGProject/fogproject/pull/2108. It names the node the host waits on, its task count and Max Clients, and each other node in the group with the reason it was passed over.
When it is in dev-branch:
- Run
updatefog.sh --branch dev-branchon the main server. - Deploy the same 12 hosts again.
- If any host waits, post the output of this, from the main server:
grep "FOG storage node overflow" /var/log/apache2/error.log | tail -5- Also post the Storage Node column from the Active Tasks page for the hosts that wait.
If a host waits and the grep finds nothing, that is useful too. It means FOG did not see the node as over its Max Clients at PXE boot.
- Run
-
@FlareImp Thanks. That line means the replicator on that server thinks it is node 1. On 11-13, after the fix in your other thread, your nodes showed their own IDs, for example node 13 TVNE-Fog. Nothing between 1.6.0.181 and 1.6.0.188 changed how a server finds its own node.
One detail stands out. On 11-13, node 1 was named TV-Fog-Main. Now the log calls node 1 “DefaultMember”, in group “default”. Those are the names FOG gives the first node and group when it creates them.
Please post:
- From Storage Node Management: the name, IP address, storage group and Is Master setting of node 1. If no node is named DefaultMember, say so.
- Which server you read each log on, and how: the Log Viewer page, or the file /opt/fog/log/fogreplicator.log on that server.
- On one storage node that shows node ID 1, the output of:
hostname; hostname -I; grep -v '^#' /etc/hosts head -20 /opt/fog/log/fogreplicator.logYour log says group “default” has no images, so these runs copy nothing. As a precaution until we know why, stop the replicators on the storage nodes again, but not on the main server. On 11-13, a node that acted as the main server deleted files on the other nodes:
sudo systemctl stop FOGImageReplicator FOGSnapinReplicator -
@Tom-Elliott There is not a default group. The main fog server is TV-Fog-Main and its in a storage group A(Default) by itself. I’m reading the logs from /opt/fog/log/fogreplicator.log on each storage node.
head -20 /opt/fog/log/fogreplicator.log TVMS-Fog 10.229.9.50 127.0.0.1 localhost 127.0.1.1 tvms-fog ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters [11-17-26 8:08:06 pm] ===== FOG 1.6.0.181 -- ImageReplicator starting ===== [11-17-26 8:08:06 pm] Interface Ready with IP Address: 10.229.9.50 [11-17-26 8:08:06 pm] Interface Ready with IP Address: 127.0.0.1 [11-17-26 8:08:06 pm] Interface Ready with IP Address: 127.0.1.1 [11-17-26 8:08:06 pm] Interface Ready with IP Address: TVMS-Fog [11-17-26 8:08:06 pm] * Starting ImageReplicator Service [11-17-26 8:08:06 pm] * Checking for new items every 600 seconds [11-17-26 8:08:06 pm] * Starting service loop [11-17-26 8:08:06 pm] * Starting Image Replication. [11-17-26 8:08:06 pm] * We are group ID: 1. We are group name: default [11-17-26 8:08:06 pm] * We are node ID: 1. We are node name: DefaultMember [11-17-26 8:08:06 pm] * Attempting to perform Group -> Group image replication. [11-17-26 8:08:06 pm] | There are no images available!. [11-17-26 8:31:31 pm] ===== FOG 1.6.0.181 -- ImageReplicator starting ===== [11-17-26 8:31:32 pm] Interface Ready with IP Address: 10.229.9.50 [11-17-26 8:31:32 pm] Interface Ready with IP Address: 127.0.0.1 [11-17-26 8:31:32 pm] Interface Ready with IP Address: 127.0.1.1 [11-17-26 8:31:32 pm] Interface Ready with IP Address: TVMS-Fog [11-17-26 8:31:32 pm] * Starting ImageReplicator Service [11-17-26 8:31:32 pm] * Checking for new items every 600 seconds -
@FlareImp Thanks, that shows it. Your real database has no group “default” and no node “DefaultMember”. So TVMS-Fog is not reading your main server’s database. It reads a database on TVMS-Fog itself. The FOG installer fills a new database with that group and node, and gives the node the server’s own IP. So TVMS-Fog matches node 1 in its own database, and that database has no images.
A storage node must use the main server’s database. Please run this on TVMS-Fog and post the output. It shows no passwords:
grep -E '^(installtype|snmysqlhost|snmysqluser)=' /opt/fog/.fogsettings grep DATABASE_HOST /var/www/html/fog/commons/config.class.phpOn a storage node, installtype should be ‘S’, and snmysqlhost and DATABASE_HOST should be your main server’s IP. If they are not, that server was installed or updated as a full server. Please run the same two commands on your other storage nodes too.
Keep the replicators on the storage nodes stopped until this is fixed.
-
@Tom-Elliott I figured it out and it is totally my bad. Two of my sites i forgot to delete the old answer files so when I set them up they got the information for the old server. after deleting the fog settings and going back through the setup they are working correctly. Apologies for the extra work Tom.
-
@FlareImp No problem at all, thanks for tracking it down. Now that those two servers point at the main server’s database, you can start their replicators again:
sudo systemctl enable --now FOGImageReplicator FOGSnapinReplicatorAfter one cycle, /opt/fog/log/fogreplicator.log on each should show its own node and group, not node 1.
For the two hosts that waited in the queue: the next time you deploy that lab, post the
FOG storage node overflowlines from /var/log/apache2/error.log if any host waits. -
@Tom-Elliott The fog replication log on both is showing the correct information. Hopefully tomorrow morning I can post about the queuing issues.