-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only exit at upgrade when the on-disk binary is ready. (#771)
* Only exit at upgrade when the on-disk binary is ready. * Fix connection retry when ping succeeds and then connection fail. This happens when e.g. the HBA rules have not been set yet on the monitor. We have a timing where we could ping successfully and then fail to connect, and in that situation we had a spurious call to pgsql_finish() that would reset the connection statement type to SINGLE, even when it was before set to SINGLE. * Prepare an environment where we can test upgrade paths. The new directory tests/upgrade contains a docker compose file that allows running a monitor and three nodes in a way that will allow testing upgrades thanks to the following command: $ docker-compose up --build monitor This will rebuild the docker image used in the docker compose environment from the local repository checkout and restart the monitor with the new binaries. To test upgrades from earlier versions of pg_auto_failover though, hacking the docker compose file to its argument-based style (instead of the current environment based style) would be necessary, because this PR introduces new code to enhance our support for environment variables at create time. * Implement a retry policy for getaddrinfo(). * When starting the monitor, review the HBA settings later. Only allow connections to be made to the monitor when everything else has been checked and is known to be ready. * Use buster-slim instead of stable-slim Debian bullseye got released 5 days ago and this broke the docker build file. * Use docker-compose instead of docker compose Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
- Loading branch information
Showing
14 changed files
with
627 additions
and
76 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
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
Oops, something went wrong.