cleanup
This commit is contained in:
parent
a49371c3dd
commit
251af10faf
1190 changed files with 12636 additions and 12476 deletions
|
|
@ -9,10 +9,18 @@ Companion programs are not yet a first-class managed system. Current behavior is
|
|||
Important references:
|
||||
|
||||
- `docs/decisions/0003-companion-programs.md`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent_Linux/gsp_agent.pl`
|
||||
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
|
||||
- `Panel/modules/config_games/schema_server_config.xml`
|
||||
|
||||
Current lifecycle hardening:
|
||||
|
||||
- Linux and Windows both prepare `_gsp_content/runtime/server_content.pids` under each server home.
|
||||
- Stop and restart clean server-owned content PIDs before main server process escalation.
|
||||
- Main game server PIDs stay in agent runtime metadata, not in the server-content PID registry.
|
||||
- Windows imports legacy `_alsoRun.pid` entries into the server-content cleanup path for compatibility.
|
||||
- New sidecars, bots, and hooks should use server-owned content runtime, not agent-global or customer-editable helper processes.
|
||||
|
||||
## What The System Needs To Do
|
||||
|
||||
- start companion apps with the server
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Workspace reference: [`GSP-WORKSPACE.md`](../../../GSP-WORKSPACE.md)
|
|||
|
||||
## Reviewed Hosts / Panels
|
||||
|
||||
- Open Game Panel
|
||||
- GameServer Panel
|
||||
- TCAdmin
|
||||
- Pterodactyl
|
||||
- GameServers.com
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ Important references:
|
|||
- `Panel/modules/gamemanager/home_handling_functions.php`
|
||||
- `Panel/modules/addonsmanager/module.php`
|
||||
- `Panel/modules/steam_workshop/module.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent_Linux/gsp_agent.pl`
|
||||
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
|
||||
|
||||
## Installer Types Seen In The Codebase
|
||||
|
||||
|
|
@ -29,18 +29,18 @@ Installer strategy should come from game capability metadata. The agent should e
|
|||
|
||||
## Windows Agent Install Notes
|
||||
|
||||
The Windows agent is Cygwin-based under `Agent-Windows/OGP64`.
|
||||
The Windows agent is Cygwin-based under `Agent-Windows/GSP64`.
|
||||
|
||||
Common installed layout:
|
||||
|
||||
- Cygwin root: `C:\OGP64`
|
||||
- Bash: `C:\OGP64\bin\bash.exe`
|
||||
- Agent root: `C:\OGP64\OGP`
|
||||
- Maintained launcher: `C:\OGP64\agent_start.bat`
|
||||
- Stop launcher: `C:\OGP64\agent_stop.bat`
|
||||
- Cygwin root: `C:\GSP64`
|
||||
- Bash: `C:\GSP64\bin\bash.exe`
|
||||
- Agent root: `C:\GSP64\GSP`
|
||||
- Maintained launcher: `C:\GSP64\agent_start.bat`
|
||||
- Stop launcher: `C:\GSP64\agent_stop.bat`
|
||||
|
||||
The launcher checks `%~dp0bin\bash.exe`, `C:\OGP64\bin\bash.exe`, `C:\cygwin64\bin\bash.exe`, and `C:\cygwin\bin\bash.exe`. Missing-bash errors should print every checked path and pause in manual use.
|
||||
The launcher checks `%~dp0bin\bash.exe`, `C:\GSP64\bin\bash.exe`, `C:\cygwin64\bin\bash.exe`, and `C:\cygwin\bin\bash.exe`. Missing-bash errors should print every checked path and pause in manual use.
|
||||
|
||||
Generated config files under `/OGP/Cfg` are production state. `C:\OGP64\agent_start.bat` may create them from `.default` templates if missing, but update logic must preserve them. Restart-time auto-update may replace only `/OGP/ogp_agent.pl`; it must not overwrite `Cfg/Config.pm`, `Cfg/Preferences.pm`, `Cfg/bash_prefs.cfg`, service settings, passwords, server data, or logs.
|
||||
Generated config files under `/GSP/Cfg` are production state. `C:\GSP64\agent_start.bat` may create them from `.default` templates if missing, but update logic must preserve them. Restart-time auto-update may replace only `/GSP/gsp_agent.pl`; it must not overwrite `Cfg/Config.pm`, `Cfg/Preferences.pm`, `Cfg/bash_prefs.cfg`, service settings, passwords, server data, or logs.
|
||||
|
||||
When the Windows agent starts, `C:\OGP64\agent_start.bat` should be launched from the Cygwin root itself. It verifies the `gameserver` account, normalizes text files, validates `OGP\ogp_agent.pl`, and then launches the agent in the same console window. It should not call an installer wrapper from the start script.
|
||||
When the Windows agent starts, `C:\GSP64\agent_start.bat` should be launched from the Cygwin root itself. It verifies the `gameserver` account, normalizes text files, validates `GSP\gsp_agent.pl`, and then launches the agent in the same console window. It should not call an installer wrapper from the start script.
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ Important references:
|
|||
- `Panel/modules/gamemanager/log.php`
|
||||
- `Panel/modules/gamemanager/view_server_log.php`
|
||||
- `Panel/modules/gamemanager/get_server_log.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent_Linux/gsp_agent.pl`
|
||||
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
|
||||
|
||||
## What Works
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ Primary files:
|
|||
- `Panel/modules/cron/cron.php`
|
||||
- `Panel/modules/cron/user_cron.php`
|
||||
- `Panel/modules/cron/shared_cron_functions.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent_Linux/gsp_agent.pl`
|
||||
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
|
||||
|
||||
## Current Model
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ The Panel scheduler builds a cron expression and a command string.
|
|||
|
||||
In the common case, that command string is a `wget` call back into:
|
||||
|
||||
- `Panel/ogp_api.php`
|
||||
- `Panel/gsp_api.php`
|
||||
|
||||
The agent stores the cron entry and executes it locally.
|
||||
|
||||
|
|
@ -28,11 +28,11 @@ The agent stores the cron entry and executes it locally.
|
|||
|
||||
| Action Key | Built By | Effective Runtime Target | Modules Affected | Agent Calls Eventually Performed |
|
||||
|---|---|---|---|---|
|
||||
| `start` | `cron/shared_cron_functions.php` | `ogp_api.php?gamemanager/start` | `cron`, `gamemanager` | `universal_start` |
|
||||
| `stop` | same | `ogp_api.php?gamemanager/stop` | `cron`, `gamemanager` | `stop_server` |
|
||||
| `restart` | same | `ogp_api.php?gamemanager/restart` | `cron`, `gamemanager` | `restart_server` |
|
||||
| `steam_auto_update` | same | `ogp_api.php?gamemanager/update&type=steam` | `cron`, `gamemanager` | `steam_cmd` / auto-update path |
|
||||
| `server_content_check_updates` | same | `ogp_api.php?server_content/run_scheduled_action` | `cron`, `addonsmanager` | server-content manifest flow, remote `exec` / helper scripts |
|
||||
| `start` | `cron/shared_cron_functions.php` | `gsp_api.php?gamemanager/start` | `cron`, `gamemanager` | `universal_start` |
|
||||
| `stop` | same | `gsp_api.php?gamemanager/stop` | `cron`, `gamemanager` | `stop_server` |
|
||||
| `restart` | same | `gsp_api.php?gamemanager/restart` | `cron`, `gamemanager` | `restart_server` |
|
||||
| `steam_auto_update` | same | `gsp_api.php?gamemanager/update&type=steam` | `cron`, `gamemanager` | `steam_cmd` / auto-update path |
|
||||
| `server_content_check_updates` | same | `gsp_api.php?server_content/run_scheduled_action` | `cron`, `addonsmanager` | server-content manifest flow, remote `exec` / helper scripts |
|
||||
| `server_content_check_workshop_updates` | same | same | `cron`, `addonsmanager` | Workshop/content check flow |
|
||||
| `server_content_install_updates_if_stopped` | same | same | `cron`, `addonsmanager`, `gamemanager` | conditional install |
|
||||
| `server_content_install_updates_next_restart` | same | same | `cron`, `addonsmanager`, `gamemanager` | deferred install marker |
|
||||
|
|
@ -74,8 +74,8 @@ User/admin saves scheduler job in Panel
|
|||
-> Panel sends cron line to agent with scheduler_add_task/edit_task
|
||||
-> Agent stores job
|
||||
-> Agent executes cron job later
|
||||
-> cron job usually calls ogp_api.php
|
||||
-> ogp_api.php dispatches to gamemanager or server_content action
|
||||
-> cron job usually calls gsp_api.php
|
||||
-> gsp_api.php dispatches to gamemanager or server_content action
|
||||
-> those paths may call the agent again for actual server/content work
|
||||
```
|
||||
|
||||
|
|
@ -105,5 +105,5 @@ Current observable logs:
|
|||
## Search Coverage Used For This Document
|
||||
|
||||
- `sed -n '1,260p' Panel/modules/cron/shared_cron_functions.php`
|
||||
- `rg -n "scheduler_" Agent_Linux/ogp_agent.pl Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `rg -n "scheduler_" Agent_Linux/gsp_agent.pl Agent-Windows/GSP64/GSP/gsp_agent.pl`
|
||||
- `rg -n "gamemanager/(start|stop|restart)|server_content/run_scheduled_action" Panel/modules/cron`
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ Important references:
|
|||
- `docs/modules/SCHEDULER.md`
|
||||
- `Panel/modules/cron/cron.php`
|
||||
- `Panel/modules/cron/shared_cron_functions.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent_Linux/gsp_agent.pl`
|
||||
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
|
||||
|
||||
## Current Strengths
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ Important files:
|
|||
- `Panel/includes/lib_remote.php`
|
||||
- `Panel/modules/gamemanager/home_handling_functions.php`
|
||||
- `Panel/modules/gamemanager/server_monitor.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent_Linux/gsp_agent.pl`
|
||||
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
|
||||
|
||||
## Panel Display Behavior
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ The Panel fallback does not replace a full agent-owned status model. It exists s
|
|||
- Marker files can become stale after crashes or power loss.
|
||||
- A game can be online even if query metadata is temporarily unavailable.
|
||||
- Some games need long startup windows, so timeouts must be configurable per game.
|
||||
- `Agent status RPC unavailable` usually means the Panel could not complete the `server_status` call. On Windows/Cygwin nodes, first verify `/OGP/ogp_agent.pl` is valid Perl, `/OGP/Cfg/bash_prefs.cfg` has LF line endings and no leading spaces before assignments, and the agent starts cleanly from `Agent-Windows/OGP64/agent_start.bat` or `/OGP/Install/agent_start.bat`.
|
||||
- `Agent status RPC unavailable` usually means the Panel could not complete the `server_status` call. On Windows/Cygwin nodes, first verify `/GSP/gsp_agent.pl` is valid Perl, `/GSP/Cfg/bash_prefs.cfg` has LF line endings and no leading spaces before assignments, and the agent starts cleanly from `Agent-Windows/GSP64/agent_start.bat` or `/GSP/Install/agent_start.bat`.
|
||||
|
||||
## Planned Improvement Shape
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ This file documents the externally reachable API and webhook surfaces discovered
|
|||
|
||||
Primary files:
|
||||
|
||||
- `Panel/ogp_api.php`
|
||||
- `Panel/gsp_api.php`
|
||||
- `Panel/status_api.php`
|
||||
- `Website/api/create_order.php`
|
||||
- `Website/api/capture_order.php`
|
||||
|
|
@ -20,7 +20,7 @@ Primary files:
|
|||
|
||||
Main endpoint:
|
||||
|
||||
- `Panel/ogp_api.php`
|
||||
- `Panel/gsp_api.php`
|
||||
|
||||
Transport:
|
||||
|
||||
|
|
@ -44,8 +44,8 @@ Important notes:
|
|||
|
||||
| Endpoint | Auth | Purpose | Parameters | Returns |
|
||||
|---|---|---|---|---|
|
||||
| `ogp_api.php?token/create` | panel username/password | issue API token | `user`, `password` | JSON token payload |
|
||||
| `ogp_api.php?token/test` | token | verify token | `token` | role/status |
|
||||
| `gsp_api.php?token/create` | panel username/password | issue API token | `user`, `password` | JSON token payload |
|
||||
| `gsp_api.php?token/test` | token | verify token | `token` | role/status |
|
||||
|
||||
### User-Visible Game Server Actions
|
||||
|
||||
|
|
@ -116,10 +116,10 @@ Returns:
|
|||
|
||||
The scheduler does not call agents directly at runtime. It stores cron lines on the agent that usually call back into:
|
||||
|
||||
- `Panel/ogp_api.php?gamemanager/*`
|
||||
- `Panel/ogp_api.php?server_content/run_scheduled_action`
|
||||
- `Panel/gsp_api.php?gamemanager/*`
|
||||
- `Panel/gsp_api.php?server_content/run_scheduled_action`
|
||||
|
||||
This makes `ogp_api.php` part of the internal scheduler runtime contract.
|
||||
This makes `gsp_api.php` part of the internal scheduler runtime contract.
|
||||
|
||||
## Website API Endpoints
|
||||
|
||||
|
|
@ -159,15 +159,15 @@ Security note:
|
|||
|
||||
| Control | Where |
|
||||
|---|---|
|
||||
| token auth | `Panel/ogp_api.php` |
|
||||
| token auth | `Panel/gsp_api.php` |
|
||||
| host allowlist | `api_authorized.hosts`, `api_authorized.fwd_hosts`, `settings/api_hosts.php` |
|
||||
| role / ownership checks | inside `api_*` handlers in `ogp_api.php` |
|
||||
| role / ownership checks | inside `api_*` handlers in `gsp_api.php` |
|
||||
| webhook signature verification | `Website/webhook.php` |
|
||||
|
||||
## Search Coverage Used For This Document
|
||||
|
||||
- `rg -n "^function api_" Panel/ogp_api.php`
|
||||
- `sed -n '1,240p' Panel/ogp_api.php`
|
||||
- `rg -n "^function api_" Panel/gsp_api.php`
|
||||
- `sed -n '1,240p' Panel/gsp_api.php`
|
||||
- `sed -n '1,240p' Panel/status_api.php`
|
||||
- `find Website/api -maxdepth 1 -type f`
|
||||
- `sed -n '1,220p' Website/webhook.php`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue