GameServerManagers / GameServerManagers/LinuxGSM
[BUG] Rust Server Updating - Server marked to restart erroneously
- Dominant language
- Shell
- Stars
- 4.9k
- Forks
- 864
- PR merge metrics
- No merged PRs in 30d
Description
## User Story
As a GS Admin, I want the update function to be aware of the server restart so that the following update function doesn't restart unnecessarily.
## Basic info
* **Distro:** [Ubuntu 18.04]
* **Game:** Rust
* **Command:** u / Update
* **LinuxGSM version:** 21.1.3
## Further Information
When performing regular updates using the ./rustserver update function and a new build is available, it will first stop the server, update the build and then restart the server with the new build. However the next update function will report that the server has **not** been restarted and thus restarts erroneously.
## To Reproduce
Steps to reproduce the behaviour:
1. Rust Server - Staging Branch
2. Run Update Script when new build available and server is running.
3. Allow build to update
4. Observe server restarts with new build "[ WARN ] Updating rustserver: rustserver will be restarted" ... [ OK ] Starting rustserver: DEV Staging Branch"
5. Perform update function again
6. Observe the message [ INFO ] Updating rustserver: rustserver has not been restarted since last updat
## Expected behaviour
Server should not need to restart twice after an update when the first update has applied the new build.
Use Case: Staging Branch with irregular updates, 30min cronjob to run update so that the server is never 30mins away from being up to date for players on the staging branch wanting to play.
This behaviour has not been tested on public stable branch but anticipate the functionality is the same within LGSM regardless of branch within configuration.
Please see below console output
```
rust-dev@DEV:~$ ./rustserver u
[ OK ] Updating rustserver: Checking for update: SteamCMD
Update available
* Local build: 6313609
* Remote build: 6314803
* Branch: staging
https://steamdb.info/app/258550/
[ WARN ] Updating rustserver: rustserver will be restarted
[ OK ] Stopping rustserver: Graceful: CTRL+c: 4: OK
[ START ] Updating rustserver: SteamCMD
Branch: staging
Redirecting stderr to '/home/rust-dev/.local/share/Steam/logs/stderr.txt'
/tmp/dumps is not owned by us - delete and recreate
Unable to delete /tmp/dumps. Continuing anyway.
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x61) downloading, progress: 0.00 (0 / 2803852337)
Update state (0x61) downloading, progress: 0.35 (9860104 / 2803852337)
Update state (0x61) downloading, progress: 0.45 (12631560 / 2803852337)
Update state (0x61) downloading, progress: 16.25 (455512113 / 2803852337)
Update state (0x61) downloading, progress: 31.37 (879494593 / 2803852337)
Update state (0x61) downloading, progress: 48.87 (1370144549 / 2803852337)
Update state (0x61) downloading, progress: 51.19 (1435180942 / 2803852337)
Update state (0x61) downloading, progress: 60.19 (1687714007 / 2803852337)
Update state (0x61) downloading, progress: 72.58 (2034924263 / 2803852337)
Update state (0x61) downloading, progress: 76.48 (2144372007 / 2803852337)
Update state (0x61) downloading, progress: 99.55 (2791186290 / 2803852337)
Update state (0x61) downloading, progress: 100.00 (2803852337 / 2803852337)
Success! App '258550' fully installed.
Complete! Updating rustserver: SteamCMD
[ OK ] Starting rustserver: DEV Staging Branch
rust-dev@DEV:~$ ./rustserver u
[ INFO ] Updating rustserver: rustserver has not been restarted since last updat [ OK ] Stopping rustserver: Graceful: CTRL+c: 5: OK
[ OK ] Starting rustserver: DEV Staging Branch
```
Contributor guide
Assessment
This issue has not been assessed yet.