fix: hami-webui-be-oss startup panic due to fetchContainerInfo function#35
Merged
Merged
Conversation
Signed-off-by: 王然 <ranwang@alauda.io>
Contributor
Author
|
Also, is it necessary that the |
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Might fix #31 as well)
When I use HAMi-WebUI v1.0.5 version and HAMi master (7ee5dce) version, there is a panic issue starting hami-webui-be-oss.
Looking at the logs and code, the panic is related to the assignment of the Priority field in the fetchContainerInfo function.
Taking two container pods as an example (the first one uses GPU resources, the second one doesn't).
Before the Project-HAMi/HAMi#1012 change, the
hami.io/vgpu-devices-allocatedannotation for the pod was:GPU-b61419d8-fa53-4c5f-124c-5b23ec39dfe4,NVIDIA,4096,50:;,,0,0:;.After the change, the annotation becomes:
GPU-b61419d8-fa53-4c5f-124c-5b23ec39dfe4,NVIDIA,4096,50:;;.This resulted in the code
Priority: bizContainerDevices[i][0].Priorityassigning a value that does not exist forbizContainerDevices[i].So, I tried to make a change to be compatible with both
hami.io/vgpu-devices-allocatedannotations.