Skip to content

[πŸ› Bug]: Autoscaling issues when specifying most capabilitiesΒ #2585

@grant-mccarriagher

Description

@grant-mccarriagher

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions