pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.81k stars 1.74k forks source link

Cannot transfer server to node that has no resources left despite overallocate being set to -1. #4940

Open RealTriassic opened 11 months ago

RealTriassic commented 11 months ago

Current Behavior

Currently, if you try to transfer a server to a node that, according to the resource limits set on the panel for the node, has no resources left despite overallocate being set to -1, the panel will refuse and respond with "The node you selected does not have the required disk space or memory available to accommodate this server." despite overallocate being set to -1 in which case it should ignore the resource limits set on the panel and attempt the transfer.

Expected Behavior

The server transfer attempt should proceed, even if there are not enough resources, if the node's overallocate field is set to -1.

Steps to Reproduce

  1. Create a node on the panel
  2. Set overallocate to -1 for the node
  3. Try transfer a server that goes over the resource limits of the node

Panel Version

1.11.5

Wings Version

1.11.8

Games and/or Eggs Affected

No response

Docker Image

No response

Error Logs

No response

Is there an existing issue for this?

Boy132 commented 11 months ago

Can confirm this. Setting overallocation to -1 is not actually disabling the checks. Furthermore, it acts as "underallocation" so it will use 99% of the allocated resources for the checks.

Either the descriptions of the fields are wrong or this feature got lost somewhere.

Relevant code lines: https://github.com/pterodactyl/panel/blob/1.0-develop/app/Models/Node.php#L228-L229 (for transfers) https://github.com/pterodactyl/panel/blob/1.0-develop/app/Services/Deployment/FindViableNodesService.php#L85-L86 (for deployment)

https://github.com/pterodactyl/panel/blob/1.0-develop/resources/views/admin/nodes/new.blade.php#L124 https://github.com/pterodactyl/panel/blob/1.0-develop/resources/views/admin/nodes/new.blade.php#L143