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

Supervise cron process for better logging/signal handling/environment management #229

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

ndarilek
Copy link
Contributor

No description provided.

@ndarilek
Copy link
Contributor Author

ndarilek commented Jun 20, 2024

I'd appreciate it if someone could test this. There was an incident with Launchpad this morning that blocked me from downloading repmgr and building the image. It seems to be resolved but I still can't get the file via curl. Going to keep trying in the hope that it's a caching issue somewhere and gets resolved soon, I'll remove this comment if I manage to test this today.

@davissp14
Copy link
Contributor

@ndarilek I will take a look!

@ndarilek
Copy link
Contributor Author

I updated the machine, removed the original crontab so it regenerated, and confirmed that the script appeared to run successfully (I.e. just ran silently without error.)

I then updated the barman command to echo 2>& Test, manually set the exit code to 1, and got the following in the machine logs:

2024-06-25T16:57:01Z app[d8dd957fedde38] dfw [info]cron   | Barman cron failed with exit code 1: Test

So I think this one's ready. I did just push another commit to always rewrite the crontab--I can't imagine we'll change it often but if we do then I doubt having the slight performance boost of checking existence first would be a game-changer. Let me know if I'm missing something WRT that.

@ndarilek
Copy link
Contributor Author

Also updated the nolan/postgres-flex image with the most recent changes (I.e. not checking for crontab existence.)

Copy link
Contributor

@davissp14 davissp14 left a comment

Choose a reason for hiding this comment

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

LGMT!

@ndarilek ndarilek merged commit 84d5715 into master Jun 25, 2024
5 of 6 checks passed
@ndarilek ndarilek deleted the better-cron branch June 25, 2024 17:30
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