Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #30252: Make wait for port more resilient
The current method can result in journal error messages: [System] error Error reading socket: Encountered end of file [-5938] This updated version waits and checks for listening ports and greps for the port in question to appear before signaling that the service is ready.
- Loading branch information
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[Service] | ||
ExecStartPost=/bin/bash -c 'while ! nc -z localhost <%= scope['qpid::ssl_port'] %>; do sleep 1; done' | ||
ExecStartPost=/bin/bash -c 'while ! ss --no-header --tcp --listening --numeric sport = :<%= scope['qpid::ssl_port'] %> | grep -q "^LISTEN.*:<%= scope['qpid::ssl_port'] %>"; do sleep 1; done' |