Skip to content

Incorrect setup of Systemd restart value #375

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

Merged
merged 3 commits into from
Mar 16, 2021
Merged

Incorrect setup of Systemd restart value #375

merged 3 commits into from
Mar 16, 2021

Conversation

andrejzelnik
Copy link
Contributor

Proposed changes

This PR is intended as the fix for incorrect setup of systemd Restart value.

Current handling of the value within nginx.service.override.conf.j2:

...
{% if nginx_service_restartonfailure is defined %}
Restart=on-failure
{% endif %}
...

nginx_service_restartonfailure variable is not defined or mentioned in whole repository, but will keep its usage for backward compatibility and possible use of external value.

My proposed change works with nginx_service_restart variable that is already prepared in systemd.yml variable file:

...
# Set the restart policy for systemd systems
# Values = no (default), on-failure, on-abnormal, on-watchdog, on-abort, always
# [Service]
# Restart=on-failure
# Default is to comment this out
# nginx_service_restart: on-failure
...

Checklist

  • I have read the CONTRIBUTING document
  • I have added Molecule tests that prove my fix is effective or that my feature works
  • I have checked that all Molecule tests pass after adding my changes
  • I have updated any relevant documentation (defaults/main/*.yml, README.md and CHANGELOG.md)

@alessfg
Copy link
Member

alessfg commented Mar 16, 2021

Thanks for the PR! Somehow I missed this when reviewing the original service PR 😅

@alessfg alessfg added the bug Something isn't working label Mar 16, 2021
@alessfg alessfg added this to the 0.19.2 milestone Mar 16, 2021
@alessfg alessfg changed the title incorrect setup of systemd Restart value Incorrect setup of Systemd restart value Mar 16, 2021
@alessfg alessfg merged commit f4c0829 into nginx:main Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants