pufferpanel icon indicating copy to clipboard operation
pufferpanel copied to clipboard

SteamCMD support to improve

Open LelieL91 opened this issue 1 year ago • 6 comments

Describe the bug When the game receive an update, there is no self update check leading to a not functional server. The "manual" fix is to trigger the installation manually.

To Reproduce Steps to reproduce the behavior:

  1. Install Steam Game 730
  2. Wait for the game getting an update (could be a major one leading to force close the server instance or a minor where clients get force disconnect at server join)
  3. Server instance crash during run or server game in unusable since every player get kick at join for version mismatch

Expected behavior Add an auto startup server option to enable autoupdate or add a new hook option like Install from Steam for Update. Both GUI options will trigger a game update without validate option before actually run the server. Make also some DepotDownloader user editable, like username and password to let users use their own steam account.

Additional context

Update related dependancies:

LelieL91 avatar Oct 07 '24 16:10 LelieL91

I checked the commands performed by pufferpanel at "Install from Steam":

  • /var/lib/pufferpanel/binaries/depotdownloader/DepotDownloader -app 730 -dir /var/lib/pufferpanel/servers/6ab63b17/.manifest -loginid 126487114 -manifest-only
  • /var/lib/pufferpanel/binaries/depotdownloader/DepotDownloader -app 730 -dir /var/lib/pufferpanel/servers/6ab63b17 -loginid 670738350 validate

Added just the 2nd line as pre hook on the server, the one used for install but without validate option, and it seems ok and fast enough, except for the many Steam3 failed login. I really hope that updating the deps will fix this behaviour.

LelieL91 avatar Oct 07 '24 17:10 LelieL91

Each template makes this decision. A template supports running a pre command that can do just this.

Example: https://github.com/pufferpanel/templates/blob/fe963cdf11e0a049244f8dcbe865e2f41f046aa0/squad/squad.json#L58-L67

LordRalex avatar Oct 07 '24 17:10 LordRalex

Each template makes this decision. A template supports running a pre command that can do just this.

Example: https://github.com/pufferpanel/templates/blob/fe963cdf11e0a049244f8dcbe865e2f41f046aa0/squad/squad.json#L58-L67

I already made a template for Counter-Strike 2 including scripting libraries + a bash script running as prehook, but that's a different thing The "Install from Steam", the one also used in your example, include the validate argument, not needed for game update and we are not talking about just a couple of seconds check, just consider that games like CS are now little less than 50GB. That's why I was suggesting to add an "Update from Steam" to the hook options, same as install but without validate argument.

As workaround I just add a generic command as pre hook: /var/lib/pufferpanel/binaries/depotdownloader/DepotDownloader -app 730 -dir /var/lib/pufferpanel/servers/6ab63b17 -loginid 670738350 But as you can imagine, I can't place this command on the template because I'll need the server id as variable or the template will require manual edit at every use making it "less template". I don't even know if the default loginid is a fixed variable or not.

As for informations, other game managers seems triggering the update command right before the actual server run execution command by default.

Furthermore it will be awesome to have DepotDownloader updated hoping it fixes the Steam3 login issue

LelieL91 avatar Oct 07 '24 19:10 LelieL91

UPDATE: since CS2 server doesn't execute any server version check, I'm going to write an update script that will trigger the server restart through pufferd API. But I can't finish the CS2 server model since my update workaround (/var/lib/pufferpanel/binaries/depotdownloader/DepotDownloader -app 730 -dir /var/lib/pufferpanel/servers/6ab63b17 -loginid 670738350) is using 2 variables that are now set as fixed values:

  • Server ID
  • DepotDownloader -loginid

About the last one, I don't know if this value changes over servers installation.

LelieL91 avatar Nov 30 '24 01:11 LelieL91

Loginid we set to the server id, so it should not be required.

I had a look, and I don't see why -validate is needing to be removed?

It just makes sure that files that are installed are still valid and correct. It shouldn't make updates have issues?

LordRalex avatar Dec 01 '24 18:12 LordRalex

Loginid we set to the server id, so it should not be required.

I had a look, and I don't see why -validate is needing to be removed?

It just makes sure that files that are installed are still valid and correct. It shouldn't make updates have issues?

the loginid doesn't seems the same as the server id, by the way, the -validate flag it's ok for the installation, but since the update (that already check for changed files) cmd is the same as the installation, if the validation is on, after the actual update, it starts the validation check, that for "big" games like CS2 is a very long process, I would say also not necessary

So, if the steam update cmd is not going to be implemented, I would like to use the hooks for that, but it requires variables that I don't think PP provides

EDIT: I can assure that in 6 years of hosting game servers, never got an integrity issue during update without validation flag once. Even if I'm very cautious in my setups, using -validate for server update got only downsides, mostly on games above 20GB (CS2 is a bit less than 50GB) and my dedicated got nvme gen3 as drive, so the reading/writing speed is not really a bottleneck.

LelieL91 avatar Dec 04 '24 18:12 LelieL91