CHAT_OUTPUT_BEGIN
COMMAND_ID=CLUSTER-REFERENCE-CORE-INVENTORY-156
STATUS=FAIL
RC=1
HOST=pve01
MODE=change
COMPONENT=reference-update
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=08b3a769b8e38eaa1acec915352fb328180d70caa7ff6cd9d1ec0da426262752
COMMAND_SHA256=4004a5fa6311925347ca61391364d80f4a990a2b0cdd56de0810325d41c4851c
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGES_MADE=true
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=028bdeec2160ad20c2f0234e6be183a522174af5aac4c345b2be6df78c312e7e
SANITIZED_OUTPUT_SHA256=028bdeec2160ad20c2f0234e6be183a522174af5aac4c345b2be6df78c312e7e
OUTPUT_BEGIN
  File "<string>", line 1
    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())))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^
SyntaxError: invalid syntax

OUTPUT_END
CHAT_OUTPUT_END
