Repository navigation
fix: restart PostgreSQL for new locales after a scrubbed cluster is rebuilt - #41
Merged
Merged
Conversation
…ebuilt #40 Restarting right after the locales were generated came before initialize.yml, so on an image whose data directory was removed the restart hit a cluster that did not exist yet and failed. Flush the handlers after initialize.yml instead: the cluster exists there on both stock and scrubbed images, and the restart still precedes configure.yml and any database created in the new locale.
1 of 4 tasks
Contributor
Author
|
@MarkProminic I am merging this as it seems to be just a fix associated to our own update on #29. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written with Claude Opus 5.5
Description
Moves the "Restarting PostgreSQL now so it can use the new locales"
flush_handlersfrom the end ofsetup-Debian.ymlto just afterinitialize.ymlinmain.yml.Before this change, the restart that #29 added ran before
initialize.yml. On an image where PostgreSQL is installed but its data directory has been removed, there was no cluster yet at that point, so the restart failed withUnable to start service postgresql@15-main. The cluster only gets rebuilt later, in the "Rebuilding a scrubbed PostgreSQL cluster (Debian)" task. Now the restart runs after the rebuild. On a stock install it is still a restart after the locales are generated and before any database is created, which is what #29 needed.Closes #40
Type of Change
Role Convention Checklist
ansible-lintpasses with zero failures and zero warnings (production profile, strict): not run locally, left to CIchanged_whenon commandsmeta/argument_specs.ymland the role README updated for any variable or behavior change: no variable changesstartcloud.startcloud_rolesfor overlapTesting performed
The role's
molecule/defaultconverge and verify playbooks, run in privileged Debian 12 systemd containers (geerlingguy/docker-debian12-ansible, ansible-core 2.19).en_US.UTF-8was not generated beforehand in any run.Unable to start service postgresql@15-mainstartclouddbcollationen_US.UTF-8localesinstalled (the #29 case)startclouddbcollationen_US.UTF-8Additional Context
This was found on a SwitchBoard image whose PostgreSQL data directory is removed when the image is built.