Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix postgres tests and remove eol postgresql12 #1169

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

laalsaas
Copy link
Collaborator

@laalsaas laalsaas commented Nov 17, 2024

Since postgresql sets ProtectSystem=strict, all directories must exist before the service is started. Also all directories where write access is needed must be specified.

PL-133170

@flyingcircusio/release-managers

Release process

  • Created changelog entry using ./changelog.sh

PR release workflow (internal)

  • PR has internal ticket
  • internal issue ID (PL-…) part of branch name
  • internal issue ID mentioned in PR description text
  • ticket is on Platform agile board
  • ticket state set to Pull request ready
  • if ticket is more urgent than within the next few days, directly contact a member of the Platform team

Design notes

  • Provide a feature toggle if the change might need to be adjusted/reverted quickly depending on context. Consider whether the default should be on or off. Example: rate limiting.
  • All customer-facing features and (NixOS) options need to be discoverable from documentation. Add or update relevant documentation such that hosted and guided customers can understand it as well.

Security implications

  • Security requirements defined? (WHERE)
    • we need the postgresql test to pass.
    • we have to run supported software versions
  • Security requirements tested? (EVIDENCE)
    • the postgresql test passes now
    • postgresql12 is now removed as it's eol

@@ -167,6 +167,7 @@ in {

systemd.services.postgresql.serviceConfig = {
Restart = "always";
ReadWritePaths = [ "/nix/var/nix/gcroots/per-user/postgres" ];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me, this raises the question, why exactly we are setting gcroots „manually“ and if we really need to do that. maybe @dpausp can provide some insight here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done to keep around old postgresql versions during postgres updates. At start, each postgres verrsion registers itself in the postStart phase as a gcroot. Our fc-postgresql tooling cleans these gcroots after a successful update.

@laalsaas laalsaas changed the title Pl 133170 fix postgres tests fix postgres tests and remove eol postgresql12 Nov 17, 2024
@osnyx osnyx force-pushed the PL-133170-fix-postgres-tests branch from 5ebb829 to d0c17f2 Compare November 25, 2024 21:19
@osnyx
Copy link
Member

osnyx commented Nov 25, 2024

You forgot to remove the postgres12-related entries from important packages as well, I just added that to mitigate eval errors in a more recent nixpkgs.

Philipp Neumann added 2 commits November 25, 2024 22:25
postgresql12 is EOL as of 2024-11-14.
Since postgresql sets ProtectSystem=strict, all directories must exist
before the service is started. Also all directories where write access
is needed must be specified.

PL-133170
@osnyx osnyx force-pushed the PL-133170-fix-postgres-tests branch from d0c17f2 to 4e4b37f Compare November 25, 2024 21:25
@@ -167,6 +167,7 @@ in {

systemd.services.postgresql.serviceConfig = {
Restart = "always";
ReadWritePaths = [ "/nix/var/nix/gcroots/per-user/postgres" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done to keep around old postgresql versions during postgres updates. At start, each postgres verrsion registers itself in the postStart phase as a gcroot. Our fc-postgresql tooling cleans these gcroots after a successful update.

@osnyx osnyx merged commit 732e692 into fc-24.11-dev Nov 26, 2024
1 check passed
@osnyx osnyx deleted the PL-133170-fix-postgres-tests branch November 26, 2024 09:37
@osnyx osnyx mentioned this pull request Nov 26, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants