update(chart): Node preStop and startupProbe in autoscaling Deployment #2139
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.
Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
update(chart): Node preStop and startupProbe in autoscaling Deployment
Motivation and Context
Node startup probe.
Currently, the startup probe for Node is enabled by default with the method checking
httpGet
to Node endpoint/status
. However, when the container is up, the Node port is reachable in a short time, but meanwhile, Node could still be in progress to send the registration event to Hub/Router. By using a script is inserted into the container (/opt/selenium/nodeProbe.sh
) via ConfigMap for the startup probe with the methodexec.command
to cross-check Node is registered successfully by checkingnodeId
is present in Hub/Router (via SE_NODE_GRID_URL) before marking startup is successfully, otherwise Node will be restarted or CrashLoopBack if restarted many time and could not register.Node preStop hook
Currently, the Node preStop hook is calling the Node endpoint to drain itself. However in autoscaling as Deployment, a possible race condition is something like Node drain and Distributor assign session at the same second (mentioned in [🐛 Bug]: Session is killed and removed from Session Map in the same second that it receives another request #2129 (comment)). Node preStop now will send a drain request to the Distributor (or Hub) first, and immediately the Node drains itself request to ensure the drain request comes to the Distributor and Node simultaneously.
Types of changes
Checklist