mirror of
https://github.com/pelican-dev/panel.git
synced 2026-02-24 03:12:01 +03:00
Unknown Node allocated cpu, ram, disk #135
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rmartinoscar on GitHub (Jul 19, 2024).
Current Behavior
Those vars are never updated due to e634dd8 & 50fa260 so we don't have any way of summing allocated resources which is really annoying when you want to use Limits (should be done whenever we create/update a server to avoid flooding querys)
56b4938dc2/app/Models/Node.php (L137-L139)Expected Behavior
Those variables should represent the sum of resources allocated to servers on this node
Steps to Reproduce
None, i just tried to duplicate https://github.com/pelican-dev/panel/pull/459 but for allocated resources and not the ones being in use atm
Panel Version
1.0.0-beta6
Wings Version
1.0.0-beta3
Games and/or Eggs Affected
No response
Docker Image
No response
Error Logs
No response
Is there an existing issue for this?
@Boy132 commented on GitHub (Jul 19, 2024):
This is intented. These variables are only used when checking if the node is viable.
https://github.com/pelican-dev/panel/blob/main/app/Services/Deployment/FindViableNodesService.php#L22-L25
https://github.com/pelican-dev/panel/blob/main/app/Models/Node.php#L245-L269
@rmartinoscar commented on GitHub (Jul 19, 2024):
I know but we don't get any info on what's allocated then ?
And it doesn't change that those values are ALWAYS 0 so we can change those and their declaration aswell.
Like so
@Boy132 commented on GitHub (Jul 19, 2024):
They aren't always 0?

@rmartinoscar commented on GitHub (Jul 19, 2024):
Well i must have missed something because i was always getting 0 out of them until i redid the query
@Boy132 commented on GitHub (Jul 19, 2024):
Yes, because they are only filled when running that query. They are just temp variables for the query, basically.
The
withSumis the magical part here.@rmartinoscar commented on GitHub (Jul 19, 2024):
I see well i'll sleep slightly less dumb sorry for the inconvenience