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

    Can't add "all" hosts under one group

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    17
    3.4k
    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.
    • H
      Hanz @Tom Elliott
      last edited by

      @Tom-Elliott still on 6321, created group “Whole” and tried to add all 1600+ hosts to that group, but after it says the group updated successfully, there are no members in group “Whole”…Is there a limit to the amount that can be added at once ?

      Tom ElliottT 1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @Hanz
        last edited by

        @Hanz There is, but it varies depending on the server.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        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

        H 1 Reply Last reply Reply Quote 0
        • H
          Hanz @Tom Elliott
          last edited by

          @Tom-Elliott any suggestions ? 8G Ram I5 proc. is what I have now. Any settings for this ?

          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman @Hanz
            last edited by

            @Hanz can you add a random 5 to the group successfully?

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            H 1 Reply Last reply Reply Quote 0
            • H
              Hanz @Wayne Workman
              last edited by

              @Wayne-Workman random five works fine

              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman @Hanz
                last edited by

                @Hanz I can probably make a SQL statement that will do the group add for you in the mean time, but we do need to get this figured out. Can you check the apache error logs and mysql error logs?

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                H 1 Reply Last reply Reply Quote 0
                • H
                  Hanz @Wayne Workman
                  last edited by

                  @Wayne-Workman here is the apache error log from the instance.

                  [Mon Feb 22 08:39:23.847739 2016] [:error] [pid 5050] [client 10.72.2.46:60053] PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://10.72.3.50/fog/management/index.php?node=group&sub=membership&id=63
                  
                  Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman @Hanz
                    last edited by

                    @Hanz ok can you try what the error suggests?

                    Here’s a command to find that file:

                    find / | grep /php.ini

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                    Daily Clean Installation Results:
                    https://fogtesting.fogproject.us/
                    FOG Reporting:
                    https://fog-external-reporting-results.fogproject.us/

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      Hanz @Wayne Workman
                      last edited by Hanz

                      @Wayne-Workman sry didn’t see that error before when looking…changed it to 2500 and rebooted server…still getting same error.

                      [Mon Feb 22 08:39:23.847739 2016] [:error] [pid 5050] [client 10.72.2.46:60053] PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://10.72.3.50/fog/management/index.php?node=group&sub=membership&id=63
                      
                      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                      • Wayne WorkmanW
                        Wayne Workman @Hanz
                        last edited by

                        @Hanz Sure you got the right file? Double check for typos? It should work… 😕

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                        Daily Clean Installation Results:
                        https://fogtesting.fogproject.us/
                        FOG Reporting:
                        https://fog-external-reporting-results.fogproject.us/

                        H 1 Reply Last reply Reply Quote 0
                        • H
                          Hanz @Wayne Workman
                          last edited by

                          @Wayne-Workman I’ve got /etc/php.ini , /etc/php.ini.rpmnew, /usr/share/doc/php-common/php.ini-production, and /usr/share/doc/php-common/php.ini-development.

                          I changed the first one and double checked the line to make sure it was saved.

                          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                          • Wayne WorkmanW
                            Wayne Workman @Hanz
                            last edited by

                            @Hanz Ok then… I don’t know what is causing it then. Stand by - I’ve about got a script done that does what you want.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                            Daily Clean Installation Results:
                            https://fogtesting.fogproject.us/
                            FOG Reporting:
                            https://fog-external-reporting-results.fogproject.us/

                            H 1 Reply Last reply Reply Quote 0
                            • H
                              Hanz @Wayne Workman
                              last edited by Hanz

                              @Wayne-Workman I could do this with phpMyAdmin right ? I dunno why I didn’t think of that. Anyways I’ll go that route, but leave this just so the devs know this is going on, at least on 6321.

                              Also running php 7.0 from remi

                              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                              • Wayne WorkmanW
                                Wayne Workman @Hanz
                                last edited by

                                @Hanz This script does what you want.

                                # This script adds all fog hosts to the below specified group name.
                                # the group name is case sensitive.
                                
                                groupName=My-caseSensitive-Test-group-Name
                                
                                fogsettings=/opt/fog/.fogsettings
                                snmysqluser="$(grep 'snmysqluser=' $fogsettings | cut -d \' -f2 )"
                                snmysqlpass="$(grep 'snmysqlpass=' $fogsettings | cut -d \' -f2 )"
                                snmysqlhost="$(grep 'snmysqlhost=' $fogsettings | cut -d \' -f2 )"
                                
                                
                                if [[ $snmysqlhost != "" ]]; then
                                        hostIDs=$(mysql -s -h$snmysqlhost -u$snmysqluser -p$snmysqlpass -D fog -e "Select hostID from hosts")
                                        groupID=$(mysql -s -h$snmysqlhost -u$snmysqluser -p$snmysqlpass -D fog -e "Select groupID from groups where groupName = '$groupName'")
                                        for i in ${hostIDs[@]}; do
                                                mysql -s -h$snmysqlhost -u$snmysqluser -p$snmysqlpass -D fog -e "insert into groupMembers (gmHostID,gmGroupID) values (${i},$groupID)"
                                        done
                                elif [[ $snmysqlpass != "" ]]; then
                                        hostIDs=$(mysql -s -u$snmysqluser -p$snmysqlpass -D fog -e "Select hostID from hosts")
                                        groupID=$(mysql -s -u$snmysqluser -p$snmysqlpass -D fog -e "Select groupID from groups where groupName = '$groupName'")
                                        for i in ${hostIDs[@]}; do
                                                mysql -s -u$snmysqluser -p$snmysqlpass -D fog -e "insert into groupMembers (gmHostID,gmGroupID) values (${i},$groupID)"
                                        done
                                else
                                        hostIDs=$(mysql -s -D fog -e "Select hostID from hosts")
                                        groupID=$(mysql -s -D fog -e "Select groupID from groups where groupName = '$groupName'")
                                        for i in ${hostIDs[@]}; do
                                                mysql -s -D fog -e "insert into groupMembers (gmHostID,gmGroupID) values (${i},$groupID)"
                                        done
                                fi
                                

                                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                Daily Clean Installation Results:
                                https://fogtesting.fogproject.us/
                                FOG Reporting:
                                https://fog-external-reporting-results.fogproject.us/

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

                                205

                                Online

                                12.0k

                                Users

                                17.3k

                                Topics

                                155.2k

                                Posts
                                Copyright © 2012-2024 FOG Project