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]: Autoscaling issues when specifying most capabilities #2585

Closed
grant-mccarriagher opened this issue Jan 14, 2025 · 3 comments
Closed
Labels
I-autoscaling-k8s Issue relates to autoscaling in Kubernetes, or the scaler in KEDA R-awaiting-answer

Comments

@grant-mccarriagher
Copy link

What happened?

This issue seems distinct from the other KEDA issue that's currently open, but let me know if it's related and if this one should be closed.

We're trying to roll out Selenium Grid for k8s, and running into some autoscaling issues. When specifying just browserName, things work as expected. The appropriate number of nodes are autoscaled up, and then brought back down. However, specifying a platformName other than windows results in a session queue with no nodes being spun up. Here's a couple different scenarios we've noticed with different capabilities:

  1. { browserName: "chrome", acceptInsecureCerts: true, 'goog:chromeOptions':{ ...various chrome options }, pageLoadStrategy: "eager" }: Chrome nodes are spun up appropriately, the nodes default to Windows, sessions make it to the nodes
  2. { browserName: "firefox" }: Firefox nodes spun up appropriately, defaults to Windows, sessions make it to the nodes
  3. { browserName: "chrome", platformName: "linux" }: Nodes do not get spun up, sessions remain in queue indefinitely
  4. { browserName: "chrome", "se:downloadsEnabled": true }: The correct number of nodes are spun up, but sessions are not assigned to them and stay in the queue indefinitely. The nodes appear to lack the se:downloadsEnabled capability.

We have our own instance of KEDA that we're using which is on version 2.16.1. We're using the latest version of the chart as of this ticket, which is 0.38.4. Please let me know what additional info I can add, or if there's any questions.

Command used to start Selenium Grid with Docker (or Kubernetes)

values.yml:

global:
  seleniumGrid:
    structuredLogs: true

ingress:
  hostname: selenium-grid.internal.internal-development.our-website.com
  className: internal
  annotations:
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/app-root: &gridAppRoot "/selenium"
  paths:
  - path: /selenium(/|$)(.*)
    pathType: ImplementationSpecific
    backend:
      service:
        name: '{{ ternary (include "seleniumGrid.router.fullname" $ ) (include "seleniumGrid.hub.fullname" $ ) $.Values.isolateComponents }}'
        port:
          number: 4444

basicAuth:
  enabled: false

autoscaling:
  enableWithExistingKEDA: true
  patchObjectFinalizers:
    serviceAccount: selenium-grid-selenium-sa
  scalingType: deployment
  scaledOptions:
    minReplicaCount: 0
    maxReplicaCount: 128

hub:
  subPath: *gridAppRoot

components:
  subPath: *gridAppRoot

Relevant log output

I don't see any errors or warnings in the logs, just that the nodes are being brought up (when platformName isn't specified).

Operating System

Linux

Docker Selenium version (image tag)

4.27.0-d6e718d

Selenium Grid chart version (chart version)

0.38.4

Copy link

@grant-mccarriagher, 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!

@VietND96
Copy link
Member

@VietND96 VietND96 added R-awaiting-answer I-autoscaling-k8s Issue relates to autoscaling in Kubernetes, or the scaler in KEDA and removed needs-triaging labels Jan 14, 2025
@grant-mccarriagher
Copy link
Author

@VietND96 Thanks for explaining this, I had no idea we needed to specify which capability combinations we support in the Values file. Everything seems to be working great now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-autoscaling-k8s Issue relates to autoscaling in Kubernetes, or the scaler in KEDA R-awaiting-answer
Projects
None yet
Development

No branches or pull requests

2 participants