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

Limiting the number of hosts registered

Scheduled Pinned Locked Moved
General
5
8
655
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.
  • S
    sopinv
    last edited by Oct 9, 2023, 7:40 AM

    Hello, please tell me how you can limit the number of hosts that can register on the FOG server? Or limit the number of hosts that can deploy an image

    G 1 Reply Last reply Oct 9, 2023, 12:38 PM Reply Quote 0
    • G
      george1421 Moderator @sopinv
      last edited by Oct 9, 2023, 12:38 PM

      @sopinv FOG doesn’t have controls to limit the number of devices that can register or the number of systems that can deploy.

      This type of control is not a typical request of a FOG Administrator. What is your use case/purpose/problem you are trying to solve?

      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!

      S 1 Reply Last reply Oct 10, 2023, 5:08 AM Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Oct 9, 2023, 3:14 PM

        @sopinv Well there is a limit on parallel unicast deployments.

        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
        • S
          sopinv @george1421
          last edited by Oct 10, 2023, 5:08 AM

          @george1421 We need to limit the deployment of the image, for example, to 10 computers, for example, so that when you try to register on the 11th computer, it gives an error or something like that. That is, the main task is to limit the registration / deployment of the image to a certain number of computers.

          T 1 Reply Last reply Oct 10, 2023, 9:54 AM Reply Quote 0
          • ?
            A Former User
            last edited by Oct 10, 2023, 6:54 AM

            Hello,

            The best way to do that, i think, is to disable host registration in parameters to prevent not wanted hosts in your console.
            After that, create your hosts manually (or .calc file or api fog) in your console.
            Create groups with hosts you want to deploy. (by model, by image, by classroom … )
            In that way, you are sure to only deploy expected hosts.
            Does it meet your needs ?

            Glen

            1 Reply Last reply Reply Quote 0
            • T
              Tom Elliott @sopinv
              last edited by Oct 10, 2023, 9:54 AM

              @sopinv Deploying images, is exactly what the queue is for. Registering is just data entry into a database.

              In what sense do you want:

              “Only 10 computers are ever allowed to be registered on this server”?

              That’s where I think we’re getting confused.

              As for registering, again, this is data entry. What I think you’re asking for is, if there’s 10 tasks, and somebody else boots in, don’t allow registering the system…

              The thing is the database isn’t that heavily used, so I don’t understand the “why” here.

              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

              1 Reply Last reply Reply Quote 1
              • S
                sopinv
                last edited by sopinv Oct 12, 2023, 9:24 PM Oct 13, 2023, 3:21 AM

                When registering computers on the server, values are added to the SQL database, is it possible, for example, to limit the number of rows in the database in Linux, and not in FOG?

                T 1 Reply Last reply Oct 13, 2023, 9:58 AM Reply Quote 0
                • T
                  Tom Elliott @sopinv
                  last edited by Oct 13, 2023, 9:58 AM

                  @sopinv I don’t understand the why.

                  You can do a trigger in your database like this:

                  DELIMITER //
                  CREATE TRIGGER limit_rows_trigger
                  AFTER INSERT ON your_table
                  FOR EACH ROW
                  BEGIN
                      DECLARE row_count INT;
                      SELECT COUNT(*) INTO row_count FROM your_table;
                      IF row_count >= 1000 THEN
                          SIGNAL SQLSTATE '45000'
                          SET MESSAGE_TEXT = 'Row limit reached (1000 rows)';
                      END IF;
                  END;
                  //
                  DELIMITER ;
                  

                  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

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

                  171

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project