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

Add an option for periodically restarting the server #118

Open
YPCrumble opened this issue May 16, 2019 · 2 comments
Open

Add an option for periodically restarting the server #118

YPCrumble opened this issue May 16, 2019 · 2 comments

Comments

@YPCrumble
Copy link
Collaborator

I'm very often getting the *** System restart required *** notification when I login to an Ubuntu instance.

My suggestion is to add an (optional) task to the security role to periodically reboot the server, maybe once per month. This would allow security patches added via unattended-upgrades to be applied without having to reboot manaully.

Curious as to whether others using this repo have a restart job in their system already, and how they've implemented it?

@DavidCain
Copy link
Contributor

In a clustered system (i.e. where multiple instances all serve web traffic), one could configure automatic restarts after apt-get operations that prompt a restart, like kernel upgrades. While one server is down, the others can handle traffic.

However, this particular Ansible configuration assumes a single web server providing all functionality for a system. Accordingly, automating a restart would equate to scheduling unsupervised downtime. Depending on where in the world your userbase is, it can be tricky to pick a sensible default for everyone.

I personally just manage such downtime manually, since not all of Ubuntu's prompts to restart the system are necessarily required (for security reasons or otherwise).

A bit of a non-answer, I realize, but it's a data point that I hope is helpful!

@YPCrumble
Copy link
Collaborator Author

@DavidCain thanks for your response! Since writing this issue I realized that there's a setting to configure unattended-upgrades to auto-restart the server if there's a security upgrade and reboot is required for that patch to work.

See point three under https://help.ubuntu.com/community/AutomaticSecurityUpdates#Using_the_.22unattended-upgrades.22_package

I'm thinking that because this is security related we should reboot the server automatically if that's necessary for the security update to work. This would only happen when a security patch requires a reboot. Let me know what you think?

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

No branches or pull requests

2 participants