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

add healthcheck to spdk dockerfile #144

Closed
glimchb opened this issue Jul 20, 2022 · 0 comments · Fixed by #146
Closed

add healthcheck to spdk dockerfile #144

glimchb opened this issue Jul 20, 2022 · 0 comments · Fixed by #146
Assignees
Labels
storage APIs or code related to storage area

Comments

@glimchb
Copy link
Member

glimchb commented Jul 20, 2022

in https://github.com/opiproject/opi-poc/blob/main/storage/Dockerfile

HEALTHCHECK CMD curl --fail --insecure --user spdkuser:spdkpass -X POST -H 'Content-Type: application/json' -d '{\"id\": 1, \"method\": \"bdev_get_bdevs\"}' http://localhost:9009 || exit 1

in addition to what we have in compose

    healthcheck:
      test: ["CMD-SHELL", "curl --fail --insecure --user spdkuser:spdkpass -X POST -H 'Content-Type: application/json' -d '{\"id\": 1, \"method\": \"bdev_get_bdevs\"}' http://localhost:9009 || exit 1"]
      interval: 6s
      retries: 5
      start_period: 20s
      timeout: 10s

check via

 $ docker inspect --format='{{json .State.Health.Status}}' opi-spdk | jq
"healthy"
@glimchb glimchb added the storage APIs or code related to storage area label Jul 20, 2022
glimchb added a commit to glimchb/opi-poc that referenced this issue Jul 20, 2022
Fixes opiproject#144

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
@glimchb glimchb self-assigned this Jul 20, 2022
mestery pushed a commit that referenced this issue Jul 20, 2022
Fixes #144

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage APIs or code related to storage area
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant