diff --git a/scripts/diag_new_server.py b/scripts/diag_new_server.py index 466bdbc33..f6035a9ca 100644 --- a/scripts/diag_new_server.py +++ b/scripts/diag_new_server.py @@ -25,24 +25,28 @@ def ssh_run(cmd): ) return r.stdout, r.stderr, r.returncode -print("=== /opt/act-runner/ structure ===") -out, err, rc = ssh_run("ls -laR /opt/act-runner/ 2>/dev/null | head -60") +print("=== config.yaml (runner-1) ===") +out, err, rc = ssh_run("cat /opt/act-runner/runner-1/config.yaml") print(out) -print("\n=== docker ps -a ===") -out, err, rc = ssh_run("docker ps -a --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}' 2>/dev/null") +print("\n=== systemd service file ===") +out, err, rc = ssh_run("cat /etc/systemd/system/gitea-runner-1.service 2>/dev/null || echo 'no service file'") print(out) -print("\n=== docker compose files ===") -out, err, rc = ssh_run("find /opt -name 'docker-compose*' -o -name 'compose*' 2>/dev/null | head -10") +print("\n=== All systemd runner services ===") +out, err, rc = ssh_run("systemctl list-unit-files | grep runner") print(out) -print("\n=== Check act_runner version ===") -out, err, rc = ssh_run("/opt/act-runner/act_runner --version 2>&1") +print("\n=== Stop my broken services first ===") +out, err, rc = ssh_run("for i in 1 2 3 4 5 6; do systemctl stop gitea-runner-$i 2>/dev/null; systemctl disable gitea-runner-$i 2>/dev/null; done; echo 'done'") print(out) -print("\n=== Any runner config files ===") -out, err, rc = ssh_run("find /opt/act-runner -name '*.yml' -o -name '*.yaml' -o -name '.runner' 2>/dev/null") +print("\n=== Check docker again ===") +out, err, rc = ssh_run("docker ps -a 2>&1 | head -20") +print(out) + +print("\n=== Check if there are docker-runner services ===") +out, err, rc = ssh_run("ls /etc/systemd/system/ | grep -i -E 'runner|act'") print(out) os.unlink(key_path)