Description
Update October 2023
To pre pull images to pre started nodes is a valid use case, but #2344 is prioritized for now over this.
In #2539 I wanted to ensure that all nodes that I pre-started got images pulled to them ahead of users arriving. This may be automatic if the hub is setup with prePuller
in the jupyterhub chart, but we don't always have that enabled.
We should not have any jupyterhub prePuller
enabled when using the configurator, because then the configurator will be used to say what image to use which the jupyterhub chart's prePuller may not be aware of - and users may end up needing to wait for the prePuller image be downloaded before their actually used image when a new node starts up.
Situation background
When nodes are pre-started before users have arrived to them, its a plus if they have the image to be used by users already downloaded when they arrive.
Challenges are that if a pre-started node starts downloading any unrelated image, a user may need to wait for that. Downloading images to a pre-started node is only a guaranteed win if they are fully downloaded before the user arrive. Enabling pre-pulling of images of no relevance to an arriving user can otherwise instead slow down startup time as images are downloaded one by one by the k8s node.
Issues can arise if:
- A jupyterhub chart profileList allows users to start a number of different images
- The configurator bypasses configuration on images to be used
- Nodes are not started ahead of time users arrive, but just as users arrive and can't schedule
Pre-warming for an event where configurator is used
Assume the configurator is used, prePuller is disabled, nodes are pre-started. Then one can do the following trick to pre-pull images:
- Start prePulling what's configured in
singleuser.image
, and ensure that is relevant to pre-pull by inspecting the configurator. This can be done with a config change like this - Stop prePulling again as the hub chooses an image based on the configurator, and may end up needing to pull an unrelated image which for a new user arriving to a fresh started node can slow down startup. This can be done with a config change like this.