Skip to content

Fix the health checks not to be executed before the server and agent are running#2079

Closed
ryysud wants to merge 1 commit intospiffe:masterfrom
ryysud:fix-healthchecks-error-at-startup
Closed

Fix the health checks not to be executed before the server and agent are running#2079
ryysud wants to merge 1 commit intospiffe:masterfrom
ryysud:fix-healthchecks-error-at-startup

Conversation

@ryysud
Copy link
Contributor

@ryysud ryysud commented Jan 26, 2021

Signed-off-by: Ryuma Yoshida ryumyosh@zlab.co.jp

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality

the health check system.

Description of change

I received #2015 (review) after merging the implementation of the readiness endpoint for the health check.
To address the comments in that, I fixed the health checks not to be executed before the server and agent are running.

Which issue this PR fixes

This PR fixes #2063.

…are running

Signed-off-by: Ryuma Yoshida <ryumyosh@zlab.co.jp>
@ryysud
Copy link
Contributor Author

ryysud commented Jan 26, 2021

For example, the response of the readiness endpoint in the server:

Before the server is running

$ curl -s localhost:8080/ready | jq .
{
  "details": {
    "server": {
      "name": "server",
      "status": "ok",
      "fatal": true,
      "details": {
        "message": "skip the health check because the server is not running yet"
      },
      "check_time": "2021-01-26T15:09:13.928089+09:00",
      "num_failures": 0,
      "first_failure_at": "0001-01-01T00:00:00Z"
    }
  },
  "status": "ok"
}

After the server is running

$ curl -s localhost:8080/ready | jq .
{
  "details": {
    "server": {
      "name": "server",
      "status": "ok",
      "fatal": true,
      "details": {
        "message": "successfully fetched bundle"
      },
      "check_time": "2021-01-26T15:09:21.933612+09:00",
      "num_failures": 0,
      "first_failure_at": "0001-01-01T00:00:00Z"
    }
  },
  "status": "ok"
}

@ryysud
Copy link
Contributor Author

ryysud commented Jan 26, 2021

With this change, the server and agent will be ready even if they are stopped, so I close this PR...

@ryysud ryysud closed this Jan 26, 2021
@ryysud ryysud deleted the fix-healthchecks-error-at-startup branch January 28, 2021 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Health checks errors may be shown at startup

1 participant