Skip to content

Fix changedetector restart loop#2548

Merged
casperklein merged 8 commits intodocker-mailserver:masterfrom
casperklein:fix-changedetector-restart-loop
Apr 19, 2022
Merged

Fix changedetector restart loop#2548
casperklein merged 8 commits intodocker-mailserver:masterfrom
casperklein:fix-changedetector-restart-loop

Conversation

@casperklein
Copy link
Copy Markdown
Member

@casperklein casperklein commented Apr 13, 2022

Description

The supervisord configuration for changedetector always restarts the service once it exits:

In case the changedetector service exits with an error, it's restarted. This leads to an endless exit and restart loop.

To prevent this, autorestart=true has been removed from the configuration. This lets supervisord only restart the service, when it exits with error code >0.

The function _exit_with_error now allows to pass a second argument: the exit code.

In case of an error, changedetector exits as before, but will not be restarted by supervisord.

Fixes #2546

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@casperklein casperklein marked this pull request as ready for review April 13, 2022 22:40
@casperklein casperklein requested a review from a team April 13, 2022 22:40
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach left a comment

Choose a reason for hiding this comment

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

👍

@georglauterbach georglauterbach added this to the v11.0.0 milestone Apr 18, 2022
@georglauterbach georglauterbach mentioned this pull request Apr 19, 2022
4 tasks
@casperklein casperklein merged commit cbcc382 into docker-mailserver:master Apr 19, 2022
@casperklein casperklein deleted the fix-changedetector-restart-loop branch June 5, 2022 22:16
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.

[BUG] High CPU consumption of supervisord

3 participants