| workflow_payload |
name: Diagnose dedicated rootless daemon without c name: Diagnose dedicated rootless daemon without changing services
"on":
push:
branches: [codex/runner-maintenance-diagnostic-20261101]
paths: [.gitea/workflows/gitea-rootless-runtime-diagnostic.yml]
jobs:
inspect:
name: inspect
runs-on: ubuntu-latest
if: github.repository == 'luoanwu/enterprise-platform'
steps:
- name: Read only fixed private synthetic test failure
run: |
set -eu
python3 <<'PYCODE'
import pathlib,re,json,subprocess,os
root=pathlib.Path('/var/lib/eios-r1-maintenance')
env=['env','-i','PATH=/usr/local/bin:/usr/bin:/bin','HOME=/var/lib/eios-runner','XDG_RUNTIME_DIR=/run/user/994','DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/994/bus']
def user(args):return subprocess.run(['runuser','-u','eios-runner','--',*env,*args],capture_output=True,timeout=30)
status=user(['systemctl','--user','show','docker.service','--property=MainPID,ActiveState,SubState,ExecMainStatus,FragmentPath'])
props=dict(line.split('=',1) for line in status.stdout.decode().splitlines() if '=' in line)
journal=subprocess.run(['journalctl','_SYSTEMD_USER_UNIT=docker.service','_UID=994','-n','50','--no-pager'],capture_output=True,timeout=30)
lines=[line[-700:] for line in journal.stdout.decode(errors='replace').splitlines() if not re.search(r'(?i)password|secret|authorization|://[^ /]+@',line)]
paths=[]
for p in pathlib.Path('/run/user/994').rglob('*'):
if len(paths)>=70:break
paths.append({'path':str(p),'socket':p.is_socket(),'symlink':p.is_symlink()})
print('GITEA_ROOTLESS_RUNTIME_DIAG_JSON '+json.dumps({'kind':'RootlessRuntimeReadOnlyDiagnosis','ci':{'sourceSha':os.environ.get('GITHUB_SHA'),'runId':os.environ.get('GITHUB_RUN_ID')},'unit':props,'screenedJournal':lines,'runtimePaths':paths,'mutations':False,'releaseEligible':False},separators=(',',':')),flush=True)
PYCODE
shell: bash
timeout-minutes: "3"
permissions:
contents: read
... |