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

[🐛 Breaking change]: Harmonized configuration mount point between docker images to /opt/selenium/config.toml #2340

Closed
Trigtrig opened this issue Aug 8, 2024 · 4 comments · Fixed by #2343
Labels
Milestone

Comments

@Trigtrig
Copy link
Contributor

Trigtrig commented Aug 8, 2024

What happened?

This is more an inconsistency instead of a bug but it may lead to confusion when mounting a configuration file.

When setting up a Selenium Grid using Docker we can mount a config.toml for configuration as shown in the documenation. But the mount point differs in the images. Here is a small table showing the current state:

Docker image mount point
Hub /opt/selenium/config.toml
NodeDocker /opt/bin/config.toml
NodeBase /opt/selenium/config.toml
Standalone /opt/selenium/config.toml
StandaloneDocker /opt/bin/config.toml

This may lead to configuration errors since the config.toml is mounted to a valid location in one container but will be silently ignored in another container where the mount point differs. I added a simple hub-node-setup using docker-compose which shows that.

I would suggest to always use the same mount point for config.toml and I'm willing to send in a PR but since this can break existing docker setups, I'm not sure what is the best way to change this.

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

# docker-compose.yml
name: selenium-grid

services:
  selenium-hub:
    image: selenium/hub:4.23.0
    container_name: selenium-hub
    ports:
      - "4444:4444"
    volumes:
      # mounted to /opt/bin/ instead of expected mount point /opt/selenium/ will run the hub by mistake without the desired configuration
      - ./hub-config.toml:/opt/bin/config.toml

  selenium-node:
    image: selenium/node-docker:4.23.0
    container_name: selenium-node
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_NODE_GRID_URL=http://selenium-hub:4444
    volumes:
      # same mount point will work for the node
      - ./node-config.toml:/opt/bin/config.toml


# hub-config.toml
[router]
username = "foo"
password = "bar"


# node-config.toml
[server]
host = "selenium-node"
port = "5555"

[node]
detect-drivers = true
override-max-sessions = false

Relevant log output

no relevant log output

Operating System

doesn't matter

Docker Selenium version (image tag)

4.23.0

Selenium Grid chart version (chart version)

no chart involved

Copy link

github-actions bot commented Aug 8, 2024

@Trigtrig, 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 commented Aug 9, 2024

@diemol, what do you think?

@diemol
Copy link
Member

diemol commented Aug 9, 2024

This makes sense. We might have just missed being consistent across images. We should be using /opt/selenium/config.toml in all of them.

@VietND96 VietND96 pinned this issue Aug 12, 2024
@VietND96 VietND96 changed the title [🐛 Bug]: Configuration mount point differs between docker images [🐛 Breaking change]: Harmonized configuration mount point between docker images to /opt/selenium/config.toml Aug 12, 2024
@VietND96 VietND96 added this to the 4.23.1 milestone Aug 20, 2024
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 Sep 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants