Skip to content

Environment variable overrides are ignored with latest image #283

Closed
@gerich-home

Description

@gerich-home

Hi,
I have identified that hub ignores environment variable overrides.
I am not able to change the value of config options in docker-compose file:

  hub:
    image: selenium/hub
    environment:
      - GRID_TIMEOUT=36000

I see that my change has no effect (it is critical!).

I try ssh'ing into container:

docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED              STATUS              PORTS
                             NAMES
...
357362562d6f        selenium/hub                  "/opt/bin/entry_point"   About a minute ago   Up About a minute   4444/tcp
                             e2e_hub_1
...

docker exec -it 357362562d6f sh

There I view config.json and see that it has default content in it!

$ cat /opt/selenium/config.json

{
  "host": null,
  "port": 4444,
  "prioritizer": null,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "newSessionWaitTimeout": -1,
  "jettyMaxThreads": -1,
  "nodePolling": 5000,
  "cleanUpCycle": 5000,
  "timeout": 30000,
  "browserTimeout": 0,
  "maxSession": 5,
  "unregisterIfStillDownAfter": 30000
}

I try regenerating it manually:

$ /opt/selenium/generate_config > /opt/selenium/config.json

And it now contains valid values:

$ cat /opt/selenium/config.json

{
  "host": null,
  "port": 4444,
  "prioritizer": null,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "newSessionWaitTimeout": -1,
  "jettyMaxThreads": -1,
  "nodePolling": 5000,
  "cleanUpCycle": 5000,
  "timeout": 36000,
  "browserTimeout": 0,
  "maxSession": 5,
  "unregisterIfStillDownAfter": 30000
}

The issue seems to be introduced by #185

My comment on it: #185 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions