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
chore: add docker healthcheck to SIPI image (INFRA-130) #2359
Conversation
Codecov ReportBase: 86.68% // Head: 6.07% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2359 +/- ##
==========================================
- Coverage 86.68% 6.07% -80.61%
==========================================
Files 250 271 +21
Lines 28252 28306 +54
==========================================
- Hits 24490 1721 -22769
- Misses 3762 26585 +22823
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1,3 @@ | |||
#!/bin/bash | |||
|
|||
curl -sS --fail 'http://localhost:1024/server/test.html' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually use 0.0.0.0
instead of localhost
, so I think it would be better to stay consistent here as well, although it doesn't make a difference here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this would not work, as 0.0.0.0
is not a synonym for localhost
(127.0.0.1
mostly is), you can try it out on your local machine:
~❯ ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.108 ms
^C
--- localhost ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.108/0.108/0.108/0.000 ms
~❯ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.106 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.346 ms
^C
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.106/0.226/0.346/0.120 ms
~❯ ping 0.0.0.0
PING 0.0.0.0 (0.0.0.0): 56 data bytes
ping: sendto: Socket is not connected
Request timeout for icmp_seq 0
ping: sendto: Socket is not connected
Request timeout for icmp_seq 1
^C
--- 0.0.0.0 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just tried it locally and for me it works (when the stack is running).
@SamuelBoerlin , feel free to ignore my comment. The only reason I think consistency would be nice is when we want to change 0.0.0.0
to something else - then we would find all occurrences. But maybe this is not relevant for this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I had it as 0.0.0.0
first and it worked in this specific case, but to me it's sort of unclear what happens when that address is used as destination. On some system it seems to behave like localhost
, on some not so much. So I think it's better to use localhost
or 127.0.0.1
.
Thanks! |
Pull Request Checklist
Task Description/Number
https://linear.app/dasch/issue/INFRA-130/implement-sipi-healthcheck
This PR adds a docker healthcheck to the knora-sipi docker image and will enable docker swarm to automatically restart SIPI when it stops working. Mitigates the impact of https://dasch.atlassian.net/wiki/spaces/E/pages/152043521/Postmortem+2022.12.06+-+DSP-APP+freezes+when+SIPI+is+not+responding and https://dasch.atlassian.net/browse/DEV-1499 as SIPI will automatically be restarted.
Issue Number: INFRA-130
Basic Requirements
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR change client-test-data?