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

Restart nginx and/or uwsgi whenever PostgreSQL is updated #31

Open
jwodder opened this issue Oct 16, 2023 · 0 comments
Open

Restart nginx and/or uwsgi whenever PostgreSQL is updated #31

jwodder opened this issue Oct 16, 2023 · 0 comments
Labels
deployment needs research More information is required security Keeping bad actors out

Comments

@jwodder
Copy link
Collaborator

jwodder commented Oct 16, 2023

Currently, the deployment pins the PostgreSQL package to prevent unattended security updates, as updating PostgreSQL causes it to restart, breaking Wheelodex's database connection. This is obviously sub-optimal.

Possible resolution: Configure systemd to restart nginx and/or uwsgi whenever PostgreSQL is restarted. In addition, configure unattended upgrades to not run while Wheelodex jobs are running (Use systemd's Conflicts field?).

  • It seems the only way to prevent two systemd timer services from running at the same time without causing one of them to fail is to use the flock command.
    • Problem: unattended-upgrades is run as root, and the wheelodex jobs are run as the wheelodex user, so there will likely be permission errors if they both have the same lockfile.

Look into other possible resolutions, as well.

@jwodder jwodder added deployment needs research More information is required security Keeping bad actors out labels Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment needs research More information is required security Keeping bad actors out
Projects
None yet
Development

No branches or pull requests

1 participant