-
Notifications
You must be signed in to change notification settings - Fork 27
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
Scheduled restart don't work from cron or systemd timers #74
Comments
i tested dirrectly dealing with container throught python docker unit and write very primitive script... as result working basic solution, leading me to conclusion that is something broken inside pok-manager.sh or some security or environment variable passing, when running through cron or systemd on my system: service unit for systemd in home ( ~/.config/systemd/user) of unix user with uid 1000:
timer unit for systemd systemd in home ( ~/.config/systemd/user) of unix user with uid 1000:
python script manager.py (without error handling and so on):
this can restart asa servers for me in sheduled time |
I looked at this as I was having the same issues with using -all within cron and found out the issue is that POK-manager is using the filesystem to get the list of server instances instead of using a docker command to get the list. This means that you need to make a small wrapper script for now to cd to where your POK-manager.sh and instance directories are located and then run the command you are wanting to run with the -all option. So for example to save the world on all servers:
|
Hi,
suddenly restarts stops working aproximatly around 26.december 2024 stops working on my fedora 41 server
(i am using ark-manager - it is renamed POK-manager, but i have inside litle tweaks for creating yaml configs for selinux - it adding :rw,z in volumes paths. without it, it cant be correctly used on this server machine with selinux)
in crontab -e:
backups and saveworld working fine
i tried adapt it to systemd timers unit, use in separate shell script, or run it as root - it leads to same behavior
directly from command line or in script it can be run ( /home/container/docker/ark-asc/ark-manager.sh -restart 15 -all )
but if is used in cron or systemd timers (both under user for contanier or root) it cant be used...
from jurnalctl when using in service file prepared for timers:
ark-ds-restart.service:
env-file:
journalctl --user -xeu ark-ds-restart.service:
that three instances didn't get commnad for restart, nothing in logs watched in another terminal pok-manager -logs -live, no restart is performed... just in output from POK-manager is info about restart, but not in related containers...
like it was send to different contaniers, or some of params, cant be accessed in environment for cron or systemd so pok-manager can't correctly perform restart... same is for using instance names ( not for -all parameter)
as mentioned before same is for crontab. only manual run of restart works...
selinux not caused this - i tried to disable it
POK-manager.sh or my ark-manager.sh - booth have same behavior... update doesn't matter.
The text was updated successfully, but these errors were encountered: