Can't add snapin to group
-
I’m finding that I can add snapins to individual hosts with no problem, but when I try to add a snapin to a group, nothing happens. In the group’s snapin configuration I select the snapin from the list of available snapins and then click “Add”. A popup says “Group Update Success / Group updated”. But the snapin is still not available to be used by this group (for example, under Basic Tasks --> Advanced --> Single Snapin).
How should I go about debugging this?
-
@Bryan-Wright Which version of FOG do you use? Do you use several storage nodes?
But the snapin is still not available to be used by this group (for example, under Basic Tasks --> Advanced --> Single Snapin).
You should see a list with all the available snapins (caption: Please select the snapin you want to install). Don’t you see this list? Is it empty?
-
@sebastian-roth
The fog version is 1.5.5, and we only use one storage node. When I try to add a “single snapin” task, I see:Please select the snapin you want to install No items found
-
@bryan-wright said in Can't add snapin to group:
The fog version is 1.5.5
This version is pretty old. Release date was in Nov 2018. While I can’t remember if there was this particular bug in 1.5.5 I can only suggest you update to 1.5.9 and see if that fixes the issue for you.
-
I think I see part of the problem. I was expecting the snapins to be attached to the group, but looking at this code in group.class.php, it appears that the snapins just get attached to each MEMBER of the group:
public function addSnapin($addArray) { $insert_fields = array('hostID', 'snapinID'); $insert_values = array(); $hosts = $this->get('hosts'); if (count($hosts) > 0) { array_walk( $hosts, function ( &$hostID, $index ) use ( &$insert_values, $addArray ) { foreach ($addArray as $snapinID) { $insert_values[] = array($hostID, $snapinID); } } ); }
I snooped around by adding some syslog messages, and it does seem that the foreach loop above is what’s invoked when I try to add a snapin to a group.
Is that what should happen? Is this possibly something that is different in the newer version of fog?
-
@bryan-wright said in Can't add snapin to group:
I was expecting the snapins to be attached to the group, but looking at this code in group.class.php, it appears that the snapins just get attached to each MEMBER of the group:
That is not a bug. That’s by design. Search the forums for “persistent groups” to understand that FOG’s concept of a group is not what you think it is. Groups are more or less a too to push settings to all the hosts being member of that group.
On the other hand I am running FOG 1.5.9 here and I do have the snapins listed when I go to Group -> Basic Tasks -> Advanced -> Single Snapin.
Your can find the full list of changes between 1.5.5 and 1.5.9 on github: https://github.com/fogproject/fogproject/compare/1.5.5..1.5.9
We can’t support or even fix older versions of FOG I am afraid. So please update to 1.5.9 and let us know if you still see the same issue.