Improve image pulling process #2276
Labels
comp:agent
Related to Agent component
comp:manager
Related to Manager component
type:feature
Add new features
Milestone
TODO steps
Note
Step 1 targets 24.03, the remaining steps target 24.09.
Step 1
PULLING
toCANCELLED
forciblyStep 2
Implement
check-and-pull
APIIt checks whether an agent has a specific image or not.
If the agent does not have the image, it starts a background task that pulls the image and returns the background task id.
After the background task finishes, the agent should dispatch
ImagePulled
event.Check images early when creating kernels
When a kernel is ready to be created, call
check-and-pull
API first. If thecheck-and-pull
API returns background task id, finish the kernel creation process and update the kernel status toPULLING
. Else, proceed to create the kernel.check-pulling-kernels
loopManager should run a global asynchronous background loop that checks all
PULLING
status kernels. It starts kernels if the image has been pulled successfully.Update
USER_RESOURCE_OCCUPYING_KERNEL_STATUSES
Exclude
PULLING
kernel status fromUSER_RESOURCE_OCCUPYING_KERNEL_STATUSES
sincePULLING
status kernels don't occupy any resources!As-is
To-do
Step 3
Step 4
The text was updated successfully, but these errors were encountered: