rathena
rathena copied to clipboard
athena-start complete bugged tool and must be rewritten.
Hash: 54b2cf3215e6f2eeeb6ff304be11dd9ee3e13b3f Mode: does not matter Client Date: does not matter too
Problem
athena-start command under Linux which is designed as a must-have basic tool for launching servers, automatically restarting them if they're crashing, collecting logs from servers output to log files, and making admins life easier - completely bugged.
Huh, completely Bugged?
Yes, you got it right. It is completely bugged and has a lot of problems. And the problem itself is that it is difficult to repeat the problem, it takes too much time, but I very much encounter in the work both I and all my friends who also use this script.
For example:
It can randomly run several servers at the same time due to some conditions (char/map/login) and I haven’t figured out exactly what the reason is, but the reason is definitely not in the operating system, because before starting the server the host itself rebooted, that is there were no copies of the server running in background. This, in turn, causes problems with access to the server (login/char/map)
And the launch of servers can be very different: two char servers can be started randomly, or two login servers, or two map servers, or without a difference, it happens differently. All this creates huge problems.
The bug exists for around 2 years for sure. Before that, I did not notice the bug, or not remember at all.
How reproduce?
./athena-start watch 180 -1 --enlog
The command must check if the servers are up and running, and if some server goes down - automatically restart, and all logs save to log files.
You can play with delays to restart too (180 replace to any other number what you prefer).
How it must work?
I suppose that the command should automatically without any problems restart a server, and keep administrators nervous safe if the server got an unexcepted crash, and restart it automatically without problems, or check properly that all running process really exists.
Additional information
- Tested on Ubuntu 16.04 / 18.04, not tested on centOS
- Tested on root user, and on simple users (nonroot accounts) does not matter.
- There are a lot of problems with this command, really a lot, better to rewrite it from scratch, maybe at some day I will push changes to this command because of this command really annoying right now.
Thank you for your time for reading the issue!
Thanks for the report. Let's explore our options here. Would making rA a systemd service instead of reinventing the wheel again work for you? If not, why?
The problem I think with compatibility to systems where is no systemd... Maybe need something another solution, don't know yet, I will try to help when I will get free time, currently very busy, just posted the issue for not forgetting about it again (because in last 2 years I just forgot to write about the bug and fixed myself it, but forgot where i did save the changes, can't find for now)
Additionally supporting OpenRC is relatively simple enough. For distros listed there, in my opinion, a few distros without OpenRC support are designed for their specific use case, and the rest are simply not popular enough to warrant support (unless someone actively maintain it for us).
There are only a few popular distros:
- Debian 7,8,9
- Ubuntu 16.04, 18.04
- CentOS 6, CentOS 7
- FreeBSD (very very rare)
- Arch (the same rare seen it as FreeBSD) About Gentoo, Majaro, mint, fedora, opensuse etc I do not even talk.
And your point is? You're not being clear here.
Hmm, explain what do you do not understand, I will try to explain to clear everything as much as I can.