-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is used by Zui to prevent orhpaned Zed processes by exiting when a client stops polling the stayalive endpoint. Closes 4863
- Loading branch information
Showing
8 changed files
with
92 additions
and
162 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
script: | | ||
source mockzui.sh | ||
zed create test | ||
echo === | ||
kill -9 $MOCKZUI_PID 2>/dev/null | ||
LAKE_EXTRA_FLAGS="-stayalivetimeout=100ms -log.level=info" source service.sh | ||
source await.sh | ||
! curl -m 0.05 $ZED_LAKE/stayalive 2> /dev/null | ||
awaitdeadservice | ||
zq -z 'msg == "Shutting down" | drop ts' lake.log | ||
inputs: | ||
- name: mockzui.sh | ||
source: mockzui.sh | ||
- name: service.sh | ||
- name: await.sh | ||
data: | | ||
function awaitdeadservice { | ||
i=0 | ||
function servicealive { kill -0 $ZED_PID 2> /dev/null; } | ||
while servicealive ; do | ||
let i+=1 | ||
if [ $i -gt 50 ]; then | ||
echo "timed out waiting for service to exit" | ||
exit 1 | ||
fi | ||
sleep 0.1 | ||
done | ||
} | ||
outputs: | ||
- name: stdout | ||
regexp: | | ||
pool created: test \w{27} | ||
=== | ||
data: | | ||
{level:"info",logger:"httpd",msg:"Shutting down",reason:"stay alive timeout reached"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters