backend.ai
backend.ai copied to clipboard
manager/api/resource.py/check_presets doesn't work well
What Operating System(s) are you seeing this problem on?
Linux (x86-64)
Backend.AI version
23.03
Describe the bug
If we make session in http://127.0.0.1:9081/ this bug happens. The first picture above CPU process bar prints 0/3, but if we make a session that uses one CPU the process bar works wrong: It prints 1/2 not 1/3.
The superficial reason for this is that the code is implemented to calculate total number of CPU as sum of 'using' CPU and 'remaining' CPU. Under this condition, 'using' CPU always zero and problem occured.
Then, why 'using' CPU always counts zero as you can see below picture?
That is because manager/api/resource.py/check_presets doesn't do its work properly. We expect that function 'check_presets' makes 'response' value( used in backend.ai-webui/src/components/backend-ai-resource-broker.ts ) that include information of resources correctly but it doesn't.
This is my debugging code for 'check_presets' and result. As you can see, the code doesn't enter the part that sets 'using' CPU: It doesn't print '2'.
I don't know the reason why this problem occur.
This phenomenon are also occurring in RAM.(maybe GPU either)
To Reproduce
make session in http://127.0.0.1:9081/
Expected Behavior
I mentioned this above.
Anything else?
No response