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

Node status is not updated in selenium grid 4 alpha or beta when in Hub and Node Mode #9182

Closed
dknopp opened this issue Feb 16, 2021 · 1 comment
Assignees
Labels

Comments

@dknopp
Copy link

dknopp commented Feb 16, 2021

🐛 Bug Report

When a node is shutdown it is still listed in the hub and has a status of UP. I believe I also tested this in the latest beta version and got the same results.

To Reproduce

  1. Spin up a hub: java -jar selenium-server-4.0.0-alpha-7.jar hub --host localhost --subscribe-events tcp://localhost:4443 --publish-events tcp://localhost:4442 --registration-secret lifebeforedeath

  2. Spin up a node: java -jar selenium-server-4.0.0-alpha-7.jar node --subscribe-events tcp://localhost:4443 --publish-events tcp://localhost:4442 --host localhost --detect-drivers true --registration-secret lifebeforedeath

  3. Query the hub: curl -v -X POST -H "Content-Type: application/json" --data '{"query": "{ grid { nodes { status } } }"}' -s http://localhost:4444/graphql

    • you will see a status of "UP"
  4. Kill/shutdown the node

  5. Query the hub again

  • you will see the node listed and it still has a status of "UP"

Detailed steps to reproduce the behavior:

Expected behavior

I expect the node status to be down

Test script or set of commands reproducing this issue

See steps to reproduce

Environment

OS: CentOS 8
Browser: Chrome Driver installed
Browser version: N/A
Browser Driver version: Latest
Language Bindings version: <N/A
Selenium Grid version (if applicable): 4.0.0-alpha-7

@ghost ghost added the needs-triaging label Feb 16, 2021
@dknopp
Copy link
Author

dknopp commented Feb 16, 2021

What is the timeout for node health did I not wait long enough? Can time interval for the check for node status / health be configured?

Answered my own question: the hub will set the node to DOWN after 5minutes which seems quite long.

The interface also shows an error at this time: GraphQL error: Can't serialize value (/grid/nodes[0]/status) : Invalid input for Enum 'Status'. Unknown value 'DOWN'

The grapgql response also contains an error

curl -v -X POST -H "Content-Type: application/json" --data '{"query": "{ grid { nodes { status } } }"}' -s http://localhost:4444/graphql

{
  "errors": [
    {
      "message": "Can't serialize value (\u002fgrid\u002fnodes[0]\u002fstatus) : Invalid input for Enum 'Status'. Unknown value 'DOWN'",
      "path": [
        "grid",
        "nodes",
        0,
        "status"
      ],
      "extensions": {
        "classification": "DataFetchingException"
      }
    }
  ],
  "data": null

Being able to configure this timeout to a smaller value would be crucial for large scale enterprise deployments and the errors in the interface, graphql are certainly defects.

@barancev barancev self-assigned this Feb 17, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants