Limiting the number of hosts registered
-
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
-
@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?
-
@sopinv Well there is a limit on parallel unicast deployments.
-
@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.
-
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
-
@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.
-
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?
-
@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 ;