ops: split ready and full healthchecks

This commit is contained in:
server
2026-04-14 13:58:13 +02:00
parent 5b0da5a685
commit 4fccf13e09
5 changed files with 117 additions and 26 deletions

View File

@@ -19,7 +19,12 @@ Installed on the VPS:
## What The Headless Healthcheck Verifies
The installed wrapper now performs two headless passes against the live server:
The installed wrapper supports two modes:
- `--mode ready`
- `--mode full`
The full mode performs two headless passes against the live server:
1. a select-screen create/delete pass
2. a full auth + channel + `ENTERGAME` + mall pass
@@ -48,7 +53,7 @@ This is an end-to-end gameplay-path verification, not just a TCP port check.
## How The Wrapper Works
`metin-login-healthcheck.sh` does the following:
`metin-login-healthcheck.sh --mode full` does the following:
- creates two temporary accounts in MariaDB
- runs `metin_login_smoke` once in create/delete mode on the select screen
@@ -58,6 +63,15 @@ This is an end-to-end gameplay-path verification, not just a TCP port check.
- deletes both temporary accounts and any temporary character rows on exit
- passes the configured client version expected by the server
`metin-login-healthcheck.sh --mode ready` is intentionally lighter:
- creates one temporary account in MariaDB
- runs one headless login flow through auth + channel + character create + select + `ENTERGAME`
- does not run the delete pass
- does not open the mall
This mode is the right readiness probe immediately after a service restart. It verifies that the server is login-ready without depending on the deeper post-login mall path.
It is intended for manual admin use on the VPS.
## Usage
@@ -69,6 +83,12 @@ ssh mt2
/usr/local/sbin/metin-login-healthcheck
```
Readiness-only mode:
```bash
/usr/local/sbin/metin-login-healthcheck --mode ready
```
The smoke binary can also be run directly:
```bash
@@ -109,6 +129,16 @@ Useful direct flags:
- `--mall-password=PASSWORD`
after `ENTERGAME`, opens the in-game mall via encrypted chat command and verifies `MALL_OPEN`
Operational CLI:
```bash
metinctl healthcheck --mode full
metinctl healthcheck --mode ready
metinctl wait-ready
```
`metinctl wait-ready` now uses the lighter `ready` mode on purpose. The deeper `full` mode remains available as an explicit admin healthcheck.
Example negative auth test:
```bash

View File

@@ -41,6 +41,7 @@ The Debian deployment installs:
- listing core files in the runtime tree
- collecting incident bundles
- running the root-only headless healthcheck
- waiting for login-ready state after restart
## Examples
@@ -80,10 +81,22 @@ Tail auth logs:
metinctl logs auth -n 200 -f
```
Run the end-to-end healthcheck:
Run the deeper end-to-end healthcheck:
```bash
metinctl healthcheck
metinctl healthcheck --mode full
```
Run the lighter readiness probe:
```bash
metinctl healthcheck --mode ready
```
Wait until a restarted stack is login-ready:
```bash
metinctl wait-ready
```
List core files currently present in the runtime tree: