1
0
Files
homelab-public-context/runtime/latest.json
T
2026-07-22 08:20:26 +00:00

31 lines
4.7 KiB
JSON

{
"schema_version": 1,
"channel": "homelab-runtime",
"command_id": "CLUSTER-REFERENCE-CORE-INVENTORY-156",
"status": "FAIL",
"rc": 1,
"host": "pve01",
"mode": "change",
"component": "reference-update",
"started_at_utc": "2026-07-22T08:20:23Z",
"finished_at_utc": "2026-07-22T08:20:25Z",
"reference_register_checked": true,
"reference_sha256": "5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e",
"error_register_checked": true,
"error_register_sha256": "08b3a769b8e38eaa1acec915352fb328180d70caa7ff6cd9d1ec0da426262752",
"command_sha256": "4004a5fa6311925347ca61391364d80f4a990a2b0cdd56de0810325d41c4851c",
"duplicate_failed_command_blocked": false,
"block_reason": null,
"execution_started": true,
"changes_made": true,
"sanitized": true,
"secrets_included": false,
"private_addresses_included": false,
"raw_evidence_retained_locally": true,
"raw_evidence_sha256": "028bdeec2160ad20c2f0234e6be183a522174af5aac4c345b2be6df78c312e7e",
"sanitized_output_sha256": "028bdeec2160ad20c2f0234e6be183a522174af5aac4c345b2be6df78c312e7e",
"output_truncated_in_json": false,
"full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt",
"output": " File \"<string>\", line 1\n import json,sys,pathlib,os,socket; r=pathlib.Path(sys.argv[1]); now=sys.argv[2]; t=pathlib.Path(sys.argv[3]); load=lambda n: json.loads((t/n).read_text(encoding=utf-8) or []); nodes=load(nodes.json); guests=load(guests.json); storage=load(storage.json); records={cluster:[{id:cluster-homelab,hostname:socket.gethostname(),kernel:os.uname().release,pve_version:(t/pveversion.txt).read_text(errors=replace),quorum_status:(t/quorum.txt).read_text(errors=replace)}],nodes:[dict(x,id=node-+str(x.get(node) or x.get(id) or unknown)) for x in nodes],guests:[{id:guest-+str(x.get(vmid)),vmid:x.get(vmid),name:x.get(name),type:x.get(type),node:x.get(node),status:x.get(status),template:x.get(template),uptime:x.get(uptime),cpus:x.get(maxcpu),memory_bytes:x.get(maxmem),disk_bytes:x.get(maxdisk),tags:x.get(tags)} for x in guests],containers:[{id:container-+str(x.get(vmid)),vmid:x.get(vmid),name:x.get(name),node:x.get(node),status:x.get(status),uptime:x.get(uptime),cpus:x.get(maxcpu),memory_bytes:x.get(maxmem),disk_bytes:x.get(maxdisk),tags:x.get(tags)} for x in guests if x.get(type)==lxc],storage:[dict(x,id=storage-+str(x.get(storage) or x.get(id) or unknown)) for x in storage],networks:[{id:network-state,interfaces:load(address.json),routes:load(routes.json)}],dns:[{id:resolver-state,hostname:socket.gethostname(),resolv_conf:(t/resolv.txt).read_text(errors=replace).splitlines()}]}; [(r/observed/(s+.json)).write_text(json.dumps({schema_version:2,section:s,layer:observed,updated_at:now,source:core-internal-collector,records:v},ensure_ascii=False,indent=2)+n,encoding=utf-8) for s,v in records.items()]; state=json.loads((r/state/current.json).read_text()); state.update({status:CORE_INTERNAL_INVENTORY_READY,updated_at:now,core_internal_counts:{s:len(v) for s,v in records.items()}}); (r/state/current.json).write_text(json.dumps(state,ensure_ascii=False,indent=2)+n); [json.loads(p.read_text()) for p in r.rglob(*.json)]; print(CORE_INTERNAL_SECTIONS=+str(len(records))); print(CORE_INTERNAL_RECORDS=+str(sum(len(v) for v in records.values())))\n ^\nSyntaxError: invalid syntax\n"
}