Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: The Selenium Grid Scaler incorrectly scales Linux pods when Windows nodes are present in the cluster. #1925

Closed
Doofus100500 opened this issue Aug 28, 2023 · 17 comments · Fixed by #2400
Labels
help wanted I-autoscaling-k8s Issue relates to autoscaling in Kubernetes, or the scaler in KEDA

Comments

@Doofus100500
Copy link
Contributor

What happened?

Hi, I've opened an issue in the KEDA project, but they say that the problem is in Selenium.

Command used to start Selenium Grid with Docker

helm chart 0.20.0

Relevant log output

All the information is available in the issue at the provided link.

Operating System

k8s

Docker Selenium version (tag)

4.11.0-20230801

@github-actions
Copy link

@Doofus100500, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol
Copy link
Member

diemol commented Aug 28, 2023

I don't understand. Do you expect that Windows containers are started?

@Doofus100500
Copy link
Contributor Author

No, the Windows nodes are located on VMs. The problem arises precisely with Linux containers when there are Windows nodes in the cluster, namely scaling fewer containers than the requested number of sessions.

@diemol
Copy link
Member

diemol commented Aug 28, 2023

I see. I am not sure what needs to be changed to have that working. Any help is appreciated.

@github-actions
Copy link

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.

@Doofus100500
Copy link
Contributor Author

I think trouble is not in selenium kedacore/keda#4908 (comment)

@Doofus100500
Copy link
Contributor Author

Hi @VietND96 , I'm ultimately being ignored in the Keda project. Perhaps you have the power to fix this bug?

@VietND96
Copy link
Member

@Doofus100500, I also started understanding what the scaler did in https://github.com/kedacore/keda/blob/main/pkg/scalers/selenium_grid_scaler.go and try to add a possible fix
As you can see, most current open issues related to autoscaling in K8s need the proper fix in the scaler, which is present only in the KEDA project.

@VietND96 VietND96 added the I-autoscaling-k8s Issue relates to autoscaling in Kubernetes, or the scaler in KEDA label Mar 21, 2024
@Doofus100500
Copy link
Contributor Author

Yes, I noticed progress in this direction here: https://github.com/SeleniumHQ/docker-selenium/blob/trunk/charts/selenium-grid/values.yaml#L721 =) I even want to study Go lang in order to submit a Pull Request to them, but life circumstances are currently stronger than me.

@Doofus100500
Copy link
Contributor Author

@VietND96 Hi, made a PR to keda to fix that kedacore/keda#5917

@VietND96
Copy link
Member

VietND96 commented Jul 1, 2024

@Doofus100500, by fixing this, do you have any clue on the issue (in a few tickets mentioned) - when using strategy: accurate, the number of pods scales up is greater than the number of requests in the queue (e.g. 1 request - 2 or 3 pod could come up).

@Doofus100500
Copy link
Contributor Author

@VietND96 No, I haven’t encountered such issues without Windows nodes

@VietND96
Copy link
Member

@Doofus100500 I started refactoring the scaler calculation via PR kedacore/keda#6169
If have time, can you walk through changes in unit tests to see your scenarios is covered

@VietND96
Copy link
Member

@Doofus100500, I saw a unit test in your last PR, so I will include it in my PR and check it.

@VietND96
Copy link
Member

You can follow https://github.com/SeleniumHQ/docker-selenium/tree/trunk/.keda
Replace KEDA component image tag and try out to see how it works

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted I-autoscaling-k8s Issue relates to autoscaling in Kubernetes, or the scaler in KEDA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants