nspcc-dev / neofs-dev-env

NeoFS local Development and Testing environment
https://fs.neo.org
GNU General Public License v3.0
9 stars 25 forks source link

ir,storage: Make healthcheck output visible in `docker inspect` #274

Closed cthulhu-rider closed 1 year ago

cthulhu-rider commented 1 year ago

Healthcheck commands of ir and storage service containers execute neofs-cli control healthcheck. Previously, exec results were just grep-ed. If output didn't contain particular string, health state log exit code was 1 with empty output. This did not allow to find out what exactly was output by the command. To make it easier to detect problems, the output should be stored regardless of the return code.

$ docker inspect --format "{{json .State.Health }}" s01 | jq

Before:

{
  "Status": "unhealthy",
  "FailingStreak": 1,
  "Log": [
    {
      "Start": "2023-08-08T12:14:31.525815071+04:00",
      "End": "2023-08-08T12:14:33.074067267+04:00",
      "ExitCode": 1,
      "Output": ""
    }
  ]
}

Now:

{
  "Status": "unhealthy",
  "FailingStreak": 1,
  "Log": [
    {
      "Start": "2023-08-08T12:14:31.525815071+04:00",
      "End": "2023-08-08T12:14:33.074067267+04:00",
      "ExitCode": 1,
      "Output": "Network status: OFFLINE\nHealth status: STARTING\n"
    }
  ]
}

roman-khimov commented 1 year ago

I think it's irrelevant now with #272 merged.

carpawell commented 1 year ago

So closing?