fixes
This commit is contained in:
parent
5ead40a761
commit
6a15b114e6
23 changed files with 269 additions and 87 deletions
|
|
@ -7,6 +7,10 @@
|
|||
## Important Files
|
||||
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/Cfg/Config.pm`
|
||||
- `Agent-Windows/OGP64/OGP/Cfg/Preferences.pm`
|
||||
- `Agent-Windows/OGP64/OGP/Cfg/bash_prefs.cfg`
|
||||
- `Agent-Windows/OGP64/OGP/Cfg/*.default`
|
||||
- `Agent-Windows/php-query/`
|
||||
- `Agent-Windows/ArmaBE/`
|
||||
- `Agent-Windows/Cfg/`
|
||||
|
|
@ -61,24 +65,31 @@ The Cygwin-side helper performs the shell work:
|
|||
|
||||
1. enter `/OGP`
|
||||
2. normalize CRLF to LF for `.pl`, `.pm`, `.sh`, and `.cfg` files under `/OGP`
|
||||
3. source `/OGP/Cfg/bash_prefs.cfg`
|
||||
4. optionally update only the Windows agent file from Forgejo when `agent_auto_update=1`
|
||||
5. backup the current `/OGP/ogp_agent.pl`
|
||||
6. validate the updated agent with `perl -c`
|
||||
7. restore the backup if validation fails
|
||||
8. launch `/OGP/ogp_agent.pl`
|
||||
3. create missing `Cfg/Config.pm`, `Cfg/Preferences.pm`, and `Cfg/bash_prefs.cfg` from tracked `.default` files
|
||||
4. strip CRLF and leading whitespace before assignments in `/OGP/Cfg/bash_prefs.cfg`
|
||||
5. source `/OGP/Cfg/bash_prefs.cfg`
|
||||
6. optionally update only the Windows agent file from Forgejo when `agent_auto_update=1`
|
||||
7. backup the current `/OGP/ogp_agent.pl`
|
||||
8. validate downloaded and installed agent files with content checks plus `perl -c`
|
||||
9. restore the backup if validation fails
|
||||
10. launch `/OGP/ogp_agent.pl`
|
||||
|
||||
Default optional update source:
|
||||
|
||||
- repo: `http://forge.runlevelsystems.com/dev/GSP.git`
|
||||
- branch: `Panel-unstable`
|
||||
- source file: `Agent-Windows/OGP64/OGP/ogp_agent.pl` in the current repo layout
|
||||
- raw URL: `http://forge.runlevelsystems.com/dev/GSP/raw/branch/Panel-unstable/Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- target file: `/OGP/ogp_agent.pl`
|
||||
|
||||
Auto-update failure is non-fatal. Missing `git`, clone failure, missing source file, or failed validation should warn and continue with the current installed agent.
|
||||
Auto-update failure is non-fatal. Missing `curl`/`git`, download failure, clone failure, missing source file, HTTP error-page downloads, empty files, or failed validation should warn and continue with the current installed agent.
|
||||
|
||||
The Windows agent file does not use `DBI` at startup. If a Windows node reports `Can't locate DBI.pm` at line 48, it is a strong signal that a Linux agent file was copied onto the Windows node.
|
||||
|
||||
Required Cygwin Perl packages include `perl`, `perl_vendor`, `perl-HTTP-Daemon`, `perl-Path-Class`, `perl-XML-Parser`, `perl-XML-Simple`, `perl-Archive-Zip`, and `perl-Archive-Extract`. A clean non-Cygwin Linux workstation may fail `perl -c` on these dependencies even though the bundled Windows Cygwin tree contains them.
|
||||
|
||||
Default tracked config files contain placeholders only. Production installs must replace `CHANGE_ME_PANEL_AGENT_KEY`, `web_api_url`, and related values with the values configured in the Panel remote-server record.
|
||||
|
||||
## Status Logic
|
||||
|
||||
Relevant functions:
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ The agents are the execution layer. They:
|
|||
Important agent files:
|
||||
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Agent_Linux/startups/`
|
||||
- `Agent-Windows/ServerFiles/`
|
||||
- `Agent_Linux/php-query/`
|
||||
|
|
@ -156,4 +156,3 @@ For future investigations, start with:
|
|||
3. `docs/modules/GAMEMANAGER.md`
|
||||
4. `docs/features/STATUS_SYSTEM.md`
|
||||
5. `docs/features/XML_SYSTEM.md`
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ This file is the first stop for future Codex sessions working in this repository
|
|||
- `Panel/modules/config_games/server_config_parser.php`
|
||||
- `Panel/includes/lib_remote.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
### Status Logic
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ This file is the first stop for future Codex sessions working in this repository
|
|||
- `Panel/modules/gamemanager/home_handling_functions.php`
|
||||
- `Panel/modules/gamemanager/server_monitor.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
### Scheduler Logic
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ This file is the first stop for future Codex sessions working in this repository
|
|||
- `Panel/modules/cron/cron.php`
|
||||
- `Panel/modules/cron/shared_cron_functions.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
### Workshop / Server Content Logic
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ This file is the first stop for future Codex sessions working in this repository
|
|||
|
||||
- `Panel/includes/lib_remote.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
### Decisions And Historical Reports
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ This file is the first stop for future Codex sessions working in this repository
|
|||
2. Check `Panel/modules/update/update.php`.
|
||||
3. Check `Panel/modules/administration/panel_update.php`.
|
||||
4. Check `Panel/includes/lib_remote.php` for the `component_update` wrapper.
|
||||
5. Check both `Agent_Linux/ogp_agent.pl` and `Agent-Windows/ogp_agent.pl` for the `component_update` RPC.
|
||||
5. Check both `Agent_Linux/ogp_agent.pl` and `Agent-Windows/OGP64/OGP/ogp_agent.pl` for the `component_update` RPC.
|
||||
6. Remember that local Panel/Website updates and remote agent updates both clone a configured Git branch into staging and copy only configured component folders.
|
||||
7. Never let updater logic delete server homes, game install folders, user data, agent `Cfg/`, logs, uploads, backups, or runtime PID files.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Important references:
|
|||
|
||||
- `docs/decisions/0003-companion-programs.md`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `Panel/modules/config_games/schema_server_config.xml`
|
||||
|
||||
## What The System Needs To Do
|
||||
|
|
@ -36,4 +36,3 @@ The system should be XML/admin-defined and agent-managed.
|
|||
## Recommendation
|
||||
|
||||
Keep the design centralized and game-aware. Do not rely on one-off helper files as the source of truth.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Important references:
|
|||
- `Panel/modules/addonsmanager/module.php`
|
||||
- `Panel/modules/steam_workshop/module.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
## Installer Types Seen In The Codebase
|
||||
|
||||
|
|
@ -24,4 +24,3 @@ Important references:
|
|||
## Recommended Model
|
||||
|
||||
Installer strategy should come from game capability metadata. The agent should execute trusted strategies, not arbitrary customer commands.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Important references:
|
|||
- `Panel/modules/gamemanager/view_server_log.php`
|
||||
- `Panel/modules/gamemanager/get_server_log.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
## What Works
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Primary files:
|
|||
- `Panel/modules/cron/user_cron.php`
|
||||
- `Panel/modules/cron/shared_cron_functions.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
## Current Model
|
||||
|
||||
|
|
@ -103,5 +103,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/ogp_agent.pl`
|
||||
- `rg -n "scheduler_" Agent_Linux/ogp_agent.pl Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
- `rg -n "gamemanager/(start|stop|restart)|server_content/run_scheduled_action" Panel/modules/cron`
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Important references:
|
|||
- `Panel/modules/cron/cron.php`
|
||||
- `Panel/modules/cron/shared_cron_functions.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
## Current Strengths
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,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`.
|
||||
|
||||
## Planned Improvement Shape
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ Current display mapping:
|
|||
|
||||
Query metadata remains optional. A running process/session or listening game port must not be shown as red/offline only because query details are unavailable.
|
||||
|
||||
If the monitor says `Agent status RPC unavailable`, treat it as an agent reachability/startup problem before changing query logic. For Windows/Cygwin nodes, validate `/OGP/ogp_agent.pl` with `perl -c`, check `/OGP/Cfg/bash_prefs.cfg` for CRLF or leading whitespace before assignments, and start the agent through the maintained launcher in `Agent-Windows/OGP64/agent_start.bat` or `/OGP/Install/agent_start.bat`.
|
||||
|
||||
## Log Viewer
|
||||
|
||||
Relevant files:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Important files:
|
|||
- `Panel/modules/cron/cron.php`
|
||||
- `Panel/modules/cron/shared_cron_functions.php`
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
|
||||
|
||||
## How It Works Today
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ If scheduler behavior needs deeper investigation, start with:
|
|||
- `Panel/modules/cron/cron.php`
|
||||
- `Panel/modules/cron/shared_cron_functions.php`
|
||||
- `Agent_Linux/ogp_agent.pl` scheduler subroutines
|
||||
- `Agent-Windows/ogp_agent.pl` scheduler subroutines
|
||||
- `Agent-Windows/OGP64/OGP/ogp_agent.pl` scheduler subroutines
|
||||
|
||||
## Current Panel Update Finding
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ Important implementation note:
|
|||
- These helpers must not be nested inside another function. A previous bad edit placed `gsp_update_settings()` inside `gsp_get_git_commit()`, which caused a fatal error when the update page called the helper before `gsp_get_git_commit()` had ever executed.
|
||||
- If the update page throws `Call to undefined function gsp_update_settings()`, first verify the deployed `Panel/modules/administration/panel_update.php` matches the repository version and that this helper exists near the top of the file before `gsp_panel_update_section()` is called.
|
||||
- `gsp_do_configured_git_update()` must also remain top-level. A bad edit placed it inside `gsp_do_update()`, so `/home.php?m=update` called an undefined function until a legacy GitHub update path happened to execute first.
|
||||
- `gsp_checkout_update_source()` must remain top-level. If it is nested inside `gsp_apply_update_from_zip()` or another helper, configured Git updates can fatal with `Call to undefined function gsp_checkout_update_source()`.
|
||||
|
||||
## Update Flow
|
||||
|
||||
|
|
@ -130,6 +131,7 @@ The old repeated SSL vhost disable buttons are not part of the primary update pa
|
|||
|
||||
- The update page fatal `Call to undefined function gsp_update_settings()` means the deployed `Panel/modules/administration/panel_update.php` is missing the top-level helper or is not the current repository copy.
|
||||
- The update page fatal `Call to undefined function gsp_do_configured_git_update()` means the configured Git update helper is missing or nested inside another helper in the deployed `panel_update.php`.
|
||||
- The update page fatal `Call to undefined function gsp_checkout_update_source()` means the configured Git checkout helper is missing or nested inside another helper in the deployed `panel_update.php`.
|
||||
- `Panel/modules/update/update.php` only loads `Panel/modules/administration/panel_update.php` and calls `gsp_panel_update_section()`.
|
||||
- The configured update action uses `git clone --depth 1 --branch <configured branch> <configured repository source> <temporary checkout>`.
|
||||
- Clone failures are logged to `logs/update_trace.log` with the configured repository source and branch.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue