-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wait for PostgreSQL in draupnir-finalise-image (#80)
The draupnir-finalise-image script waits for PostgreSQL to start accepting connections before issuing commands against it. It starts postgres via pg_ctl with the wait (-w) flag. This waits for PostgreSQL to accept connections but by default it only waits 60s. If we take longer than 60 seconds it exists nonzero and the script exists. Following the pg_ctl start command the script was then looping for up to 10 minutes trying to read in PostgreSQL logs that it was ready for connections. This loop would never function as intended as the wait flag on pg_ctl either ensures the PostgreSQL is accepting connections or it has exited nonzero and therefore the script exits as well. Removing the loop, and changing the default wait timeout of pg_ctl to 10 minutes provides the intended behaviour.
- Loading branch information
Showing
3 changed files
with
16 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.0.0 | ||
5.0.1 |
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