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

[Bug]: failure during restart causes server to be stopped but not started back up #4278

Open
ddan39 opened this issue Jul 28, 2023 · 1 comment

Comments

@ddan39
Copy link

ddan39 commented Jul 28, 2023

User story

If it is not going to run the start after the stop, then it shouldn't stop it, or if it does run stop it should always try its hardest to then start it back up.

Game

Project Zomboid

Linux distro

Debian 12

Command

command: restart

Further information

I think what's happening, but i'm not positive, is that command_restart.sh has an exitbypass=1 before command_stop.sh, so if you run into something like a permissions check like I did, it doesn't stop the command_stop.sh from running, but in core_exit.sh the exitbypass is unset after it is bypassed once, so for command_start.sh the permission check prevents it from running since exitbypass is now unset. It almost seems like the exitbypass was meant to be set before command_start.sh instead of command_stop.sh so that the stop runs then it would at least try to start the server even if there was some error.

Relevant log output

$ ~/pzserver restart
[ FAIL ] Stopping pzserver: Permissions issues found
Information! The following files are not executable:
File
/home/pztestserver/lgsm/modules/.check_permissions.sh.swp
[  OK  ] Stopping pzserver: Graceful: sending "quit": 8: OK

Steps to reproduce

No response

@dgibbs64
Copy link
Member

dgibbs64 commented Sep 4, 2023

So I have looked at the code and exitbypass is preventing the checks from exiting LinuxGSM.
exitbypass allows start to run after stop in restart by not exiting. However the side effect looks like if there is a genuine issue the server will still stop. I will look at a way to allow checks to exit even with exitbypass enabled.

Thanks for the bug report

@dgibbs64 dgibbs64 added this to the v24.3.0 milestone Aug 29, 2024
@dgibbs64 dgibbs64 removed this from the v24.3.0 milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In Progress
Development

No branches or pull requests

2 participants