Skip to content

Problem with the CrateDB Health Status #39

Description

@flopezag

Sometimes there is an error when we try to execute CrateDB requests due to the server has not finished the process of creation of the indexes and therefore the Health Status is still not GREEN.

The solution should be the implementation of a new services function 'waiting_cratedb' before finishing the script in which we request:

curl -iX POST \
  'http://localhost:4200/_sql' \
  -H 'Content-Type: application/json' \
  -d '{"stmt": "select health from sys.health order by severity desc limit 1;"}'

And example of the response is the following:

HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 70

{"cols":["health"],"rows":[["GREEN"]],"rowcount":1,"duration":41.1477}                                                                                                                                                             

We need to wait until response['rows'][0] is ["GREEN"] possible values are:

  • ["GREEN"]
  • ["YELLOW"]
  • ["RED"]
  • []

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions