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

Replace Ofelia by Chadburn for dynamic job management #4362

Open
Crazyphil opened this issue Dec 7, 2021 · 10 comments
Open

Replace Ofelia by Chadburn for dynamic job management #4362

Crazyphil opened this issue Dec 7, 2021 · 10 comments
Assignees
Milestone

Comments

@Crazyphil
Copy link

Summary

Replace Ofelia by its fork Chadburn, which support dynamic configuration management. This avoids having to restart the Ofelia container when new jobs are added or existing ones are modified, which would potentially interrupt running jobs or spam the log files when a container goes down.

Motivation

Mailcow currently facilitates Ofelia for scheduling jobs. When using Docker labels for jobs, only one Ofelia container must be present on a given Docker host, because otherwise, jobs will be scheduled multiple times. This, however, is no problem, because Mailcow clearly is open to extending the core functionality beyond a pure mailserver, e.g. by adding websites or installing additional software. Reusing the single scheduler container for other projects on the same host therefore should not be an issue.

Unfortunately, development on Ofelia has pretty much stalled, which lead to forking it as Chadburn. This new project allows dynamically (re-)loading job configuration from Docker labels without having to restart the Ofelia container. Dynamic configuration management is a very useful feature that is also used e.g. by Traefik Proxy and decouples containers from the infrastructure other containers provide. Adding different Docker projects to a Docker host while using the Mailcow Ofelia scheduler would be possible without interrupting any mailcow service, even when these projects go up and down frequently.

Additional context

Switching to Chadburn would be very easy. It is published to Docker Hub and supports the same configuration labels. The only difference is the use of the chadburn prefix instead of ofelia.

@andryyy
Copy link
Contributor

andryyy commented Dec 7, 2021

Thanks for the great FR.

We should implement it in staging for testing.

@mkuron
Copy link
Member

mkuron commented Dec 7, 2021

Please verify whether Chadburn fixes the memory leak that Ofelia had for a long time (#4272, mcuadros/ofelia#157).

@qchn
Copy link

qchn commented Dec 17, 2021

I am new to mailcow and I really enjoy using it but while researching why my setup needs so much memory ressources, I found out it's because of Ofelia and so I stumbled upon this Feature Request which I can highly support.

@maietta
Copy link

maietta commented Dec 24, 2021

Please verify whether Chadburn fixes the memory leak that Ofelia had for a long time (#4272, mcuadros/ofelia#157).

Hi there. I am the maintainer of Chadburn and discovered this issue thread while browsing for critical updates or fixes that should be implemented in Ofelia and in turn, likely to be incorporated in my hard fork. I agree, memory leaks should not be something people should deal with. I am still learning Go, so I am not sure if I can solve this one yet, but I will give it a shot.

I'll see what I can do to address the memory leak issue over the weekend and into next week.

@andryyy
Copy link
Contributor

andryyy commented Dec 24, 2021

Amazing. Thank you!

@maietta
Copy link

maietta commented Dec 24, 2021

I forked then swapped out Ofelia with the latest version of Chadburn on an 8GB ram instance of Ubuntu 20.10. While it's only been about an hour or so, the system has never spiked above 3GB of ram on my "bugkillerz.com" test email testing VPS.

I will keep this running for a while to see how this performs. I have alerts in place for if ram goes above 3.5GB. Since I am not familiar with the resource utilization expected of a minimal install of Mailcow, I don't have any reference to know if this is good or not.

I suspect if the docs say to use a 6GB + 1GB swap as minimum, then 3GB isn't too bad.

@maietta
Copy link

maietta commented Dec 25, 2021

I made the mistake of bringing in all the changes over the last 3 months into Chadburn from Ofelia only to realize that Ofelia never performed the most important pull request that caused me to fork Chadburn in the first place.

So v1.0.1 of Chadburn no longer seems to support the detection of changes in Docker containers. I will be spending my day tomorrow, Christmas trying to fix this.

@maietta
Copy link

maietta commented Aug 27, 2022

Update: Mailserver running smoothly since I last posted here, with no memory leak using Chadburn in place of Ofelia.

I'm still planning on a version 2.x in the coming months but I just wanted to let ya'll know that things are smooth on my end.

@maietta
Copy link

maietta commented Aug 8, 2023

Bump. Just letting you know the project is still not dead :)

I plan a full rewrite at some point soon but there are a lot of people using Chadburn and the issues aren't piling up and it's been a long while.

If Ofelia continues to serve this project well, great, but it doesn't appear that much has been going on with it. I want to let you know that Chadburn remains a critical component for my projects so it will always remain maintained, even if not frequently.

@DerLinkman
Copy link
Member

We will test and create a replacement pr and integrate it i think in nightly at best @FreddleSpl0it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants