• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Can't add snapin to group

    Scheduled Pinned Locked Moved
    General Problems
    2
    6
    653
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bryan Wright
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @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?

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        B 1 Reply Last reply Reply Quote 0
        • B
          Bryan Wright @Sebastian Roth
          last edited by

          @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
          
          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @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.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • B
              Bryan Wright
              last edited by

              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?

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @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.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post

                150

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project