[GH-ISSUE #1943] Improve instances management using linuxgsm.sh #1529

Open
opened 2026-02-27 02:57:38 +03:00 by kerem · 7 comments
Owner

Originally created by @fs86 on GitHub (Jul 20, 2018).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/1943

I have a DST server (Master and Caves) which are connected to each other. Both instances run under the same user. When an update is applied with "./dstserver-1 update", dstserver-1 will be restarted when the update process has finished. Unfortunately the second instance "dstserver-2" (which is my Caves server) doesn't get restarted and runs on an old server version. Is there already a possibility to force each server instance to restart after an updated has been applied?

Originally created by @fs86 on GitHub (Jul 20, 2018). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/1943 I have a DST server (Master and Caves) which are connected to each other. Both instances run under the same user. When an update is applied with "./dstserver-1 update", dstserver-1 will be restarted when the update process has finished. Unfortunately the second instance "dstserver-2" (which is my Caves server) doesn't get restarted and runs on an old server version. Is there already a possibility to force each server instance to restart after an updated has been applied?
Author
Owner

@UltimateByte commented on GitHub (Jul 20, 2018):

This would likely require a massive overhaul of LinuxGSM and the way it manages instances to be accomplished directly. But the workaround is easy:
Use force-update on the first server, and stop on the second, then about one or two minutes later (you know the time it takes to update better than me), start the second server. You can do all that using cronjobs.
https://github.com/GameServerManagers/LinuxGSM/wiki/Cronjobs

GitHub
LinuxGSM - Linux Game Server Managers_
<!-- gh-comment-id:406513773 --> @UltimateByte commented on GitHub (Jul 20, 2018): This would likely require a massive overhaul of LinuxGSM and the way it manages instances to be accomplished directly. But the workaround is easy: Use force-update on the first server, and stop on the second, then about one or two minutes later (you know the time it takes to update better than me), start the second server. You can do all that using cronjobs. https://github.com/GameServerManagers/LinuxGSM/wiki/Cronjobs <blockquote><img src="https://avatars2.githubusercontent.com/u/20358373?s=400&v=4" width="48" align="right"><div><img src="https://assets-cdn.github.com/favicon.ico" height="14"> GitHub</div><div><strong><a href="https://github.com/GameServerManagers/LinuxGSM">GameServerManagers/LinuxGSM</a></strong></div><div>LinuxGSM - Linux Game Server Managers_</div></blockquote>
Author
Owner

@fs86 commented on GitHub (Jul 20, 2018):

Yes, that should work, but it would result in a server restart even when there is no new update. And I want to prevent a server disconnect when it is not necessary.

<!-- gh-comment-id:406514855 --> @fs86 commented on GitHub (Jul 20, 2018): Yes, that should work, but it would result in a server restart even when there is no new update. And I want to prevent a server disconnect when it is not necessary.
Author
Owner

@UltimateByte commented on GitHub (Jul 22, 2018):

In fact, what you're proposing would benefit everyone with multiple instances under the same install.
We could add a parameter to stop and restart all instances upon update.
The question is: How will it detect other instances.
Maybe we could make a separate script for that, like "linuxgsm-instancesmanage.sh" or something like that.

<!-- gh-comment-id:406857769 --> @UltimateByte commented on GitHub (Jul 22, 2018): In fact, what you're proposing would benefit everyone with multiple instances under the same install. We could add a parameter to stop and restart all instances upon update. The question is: How will it detect other instances. Maybe we could make a separate script for that, like "linuxgsm-instancesmanage.sh" or something like that.
Author
Owner

@fs86 commented on GitHub (Jul 23, 2018):

What about adding a configuration file with a grouped list of instances? If "./gameserver-1 update" is executed, the script can look for other gameserver instances within the same group as "gameserver-1" and perform a restart.

<!-- gh-comment-id:407032779 --> @fs86 commented on GitHub (Jul 23, 2018): What about adding a configuration file with a grouped list of instances? If "./gameserver-1 update" is executed, the script can look for other gameserver instances within the same group as "gameserver-1" and perform a restart.
Author
Owner

@UltimateByte commented on GitHub (Jul 23, 2018):

That's a design choice to make.

I suggest a dedicated script like linuxgsm-instances.sh which would be able to detect instances, then manage them from one script. There would be a master instance (for updates), then slaves. It would loop through bash scripts in rootdir and ask to validate a list. You could input commands like linuxgsm-instances.sh start instancename or linuxgsm-instances.sh restart all, and it would be smart enough so that if you run update or validate it knows it needs to run it only on the main instance and shutdown the others when an update is found or upon validating.

What do you think?

@dgibbs64 Would you do it, and if yes, would you validate my idea?

<!-- gh-comment-id:407133777 --> @UltimateByte commented on GitHub (Jul 23, 2018): That's a design choice to make. I suggest a dedicated script like `linuxgsm-instances.sh` which would be able to detect instances, then manage them from one script. There would be a master instance (for updates), then slaves. It would loop through bash scripts in rootdir and ask to validate a list. You could input commands like `linuxgsm-instances.sh start instancename` or `linuxgsm-instances.sh restart all`, and it would be smart enough so that if you run `update` or `validate` it knows it needs to run it only on the main instance and shutdown the others when an update is found or upon validating. What do you think? @dgibbs64 Would you do it, and if yes, would you validate my idea?
Author
Owner

@dgibbs64 commented on GitHub (Jul 23, 2018):

@UltimateByte I think its something we have talked about before using ./linuxgsm.sh to manage it. Sounds like a great idea and it should be relatively easy for the instances script to identify instances within its own dir. Would be a great way to practice using milestones as well :)

<!-- gh-comment-id:407145354 --> @dgibbs64 commented on GitHub (Jul 23, 2018): @UltimateByte I think its something we have talked about before using `./linuxgsm.sh` to manage it. Sounds like a great idea and it should be relatively easy for the instances script to identify instances within its own dir. Would be a great way to practice using milestones as well :)
Author
Owner

@UltimateByte commented on GitHub (Jul 23, 2018):

Oh yeah, managing directly within linuxgsm.sh would be the greatest for sure, forgot about that idea.
Let's talk about milestones on Discord! :D

<!-- gh-comment-id:407145987 --> @UltimateByte commented on GitHub (Jul 23, 2018): Oh yeah, managing directly within linuxgsm.sh would be the greatest for sure, forgot about that idea. Let's talk about milestones on Discord! :D
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#1529
No description provided.