-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Start crond with s6 overlay #945
Comments
Thanks @vladaurosh for the ongoing help 🙏 just pushed these changes into -dev in the above commit |
Had to roll back the cron s6 implementation approach as it didn't trigger the scripts it was triggering previously - you can test this by trying to restart the app in Maintenance -> Logs -> Restart Server |
Ok, what script needs to be triggered and what does "Maintenance -> Logs -> Restart Server" restart? The python application? |
This is the corontab template: https://github.com/jokob-sk/NetAlertX/blob/main/install/crontab executing this script every minute /app/back/cron_script.sh: https://github.com/jokob-sk/NetAlertX/blob/main/back/cron_script.sh |
I might add more cron dependent scripts in future so that's why its a bit over engineered. |
Ok, so cron runs cron_script.sh every minute and that script checks if "cron_restart_backend" is present in the log file. If so it restarts the application? Btw, python app is supervised by s6, so if it is killed, s6 will start it immediately. And what would be the reason to have "cron_restart_backend" in log file? |
Yes
It's mostly used during development to load up the new version of the code or when a script hangs. |
I'll try in next couple of days to see why cron doesn't work properly for you when started via s6. |
Thanks a lot. I don't feel as confident with my knowledge with the whole s6
setup (and file permissions as you can tell) , so appreciate the help.
…On Fri, 10 Jan 2025, 09:29 vladaurosh, ***@***.***> wrote:
I'll try in next couple of days to see why cron doesn't work properly for
you when started via s6.
—
Reply to this email directly, view it on GitHub
<#945 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW5URDEHUETIOVYU6Z6O6MT2J3Z33AVCNFSM6AAAAABU2ZACKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBRGM3DKNZWGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks a lot. I don't even know when the error manifests, all my builds work
…On Mon, 20 Jan 2025, 04:50 vladaurosh, ***@***.***> wrote:
@jokob-sk <https://github.com/jokob-sk>
PR for this coming in next couple of hours.
That will fix #965 <#965>
—
Reply to this email directly, view it on GitHub
<#945 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW5URDECEFNWUONCTYOAAQT2LPQVRAVCNFSM6AAAAABU2ZACKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBQHE2TSMBUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ne errors in the image build, or when container starts. It seems to be the warning thrown by dcron, every second. |
I assume this is fixed in the dev image - adding the appropriate label - thanks for the help @vladaurosh 🙏 |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe
Hi @jokob-sk
Just noticed in https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/init.sh#L129 that crond is started in the background.
Describe the solution you'd like
Since we already use s6 overlay I think it would be good idea to move it into https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/start.sh
Probably this would do:
Also I've noticed:
First line is not needed so block should be replaced with:
mkdir -p /etc/s6-overlay/s6-rc.d/{SetupOneshot,crond/dependencies.d,php-fpm/dependencies.d,nginx/dependencies.d,$APP_NAME/dependencies.d}
Same goes for:
First line is not needed, these 2 should be replaced with:
touch /etc/s6-overlay/s6-rc.d/user/contents.d/{SetupOneshot,crond,php-fpm,nginx,$APP_NAME} /etc/s6-overlay/s6-rc.d/{crond,php-fpm,nginx,$APP_NAME}/dependencies.d/SetupOneshot
Describe alternatives you've considered
N/A
Anything else?
N/A
Am I willing to test this? 🧪
netlertx-dev
image when requested within 48h and report bugs to help deliver a great user experience for everyone and not to break existing installations.Can I help implement this? 👩💻👨💻
The text was updated successfully, but these errors were encountered: