1
0
Files
homelab-public-context/runtime/history/CLUSTER-REFERENCE-READINESS-168.json
2026-07-22 10:01:26 +00:00

31 lines
21 KiB
JSON

{
"schema_version": 1,
"channel": "homelab-runtime",
"command_id": "CLUSTER-REFERENCE-READINESS-168",
"status": "FAIL",
"rc": 1,
"host": "pve01",
"mode": "change",
"component": "reference-update",
"started_at_utc": "2026-07-22T10:01:26Z",
"finished_at_utc": "2026-07-22T10:01:26Z",
"reference_register_checked": true,
"reference_sha256": "5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e",
"error_register_checked": true,
"error_register_sha256": "08b3a769b8e38eaa1acec915352fb328180d70caa7ff6cd9d1ec0da426262752",
"command_sha256": "13b79b59906aa1b60b84c878297d9dc0954bd8a683875d4014c9920d1a2df96d",
"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": "4328ef3741bb0a63d64b79260170a0d85d440074cf7ee68d49f4c4d435b85928",
"sanitized_output_sha256": "4328ef3741bb0a63d64b79260170a0d85d440074cf7ee68d49f4c4d435b85928",
"output_truncated_in_json": false,
"full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt",
"output": "Traceback (most recent call last):\n File \"<string>\", line 1, in <module>\n exec('''import base64,datetime,json,os,pathlib,py_compile,re,shutil,subprocess,tempfile,time,urllib.parse,urllib.request\\nB='https://git.gram1.ru';O='homelab-admin';PR='homelab-public-context';VR='homelab-cluster-reference-private';BR='assistant-runtime';P='CLUSTER-REFERENCE-DOCUMENTATION-PUBLISH-167';C='CLUSTER-REFERENCE-READINESS-168';R=pathlib.Path('/etc/homelab/reference');CLI=pathlib.Path('/usr/local/sbin/homelab-reference');REF=pathlib.Path('/usr/local/sbin/homelab-reference-refresh');PUB=pathlib.Path('/usr/local/sbin/homelab-reference-publish')\\nF=lambda u:urllib.request.urlopen(urllib.request.Request(u,headers={'User-Agent':'homelab-reference/ready','Cache-Control':'no-cache'}),timeout=90).read()\\nboot=json.loads(F(B+'/.well-known/homelab-bootstrap.json'));errs=json.loads(F(boot['entrypoints']['errors_index_url']));assert C not in json.dumps(errs,ensure_ascii=False)\\ncommits={}\\nfor e in ('json','txt'):\\n p='runtime/history/'+P+'.'+e;m=json.loads(F(B+'/api/v1/repos/'+O+'/'+PR+'/contents/'+urllib.parse.quote(p,safe='/')+'?ref='+BR));commits[e]=m['last_commit_sha'];globals()['h_'+e]=F(B+'/'+O+'/'+PR+'/raw/commit/'+commits[e]+'/'+p)\\nd=json.loads(h_json);assert d.get('command_id')==P and d.get('status')=='OK' and int(d.get('rc'))==0 and d.get('execution_started') is True and b'CLUSTER_REFERENCE_DOCUMENTATION_AND_PUBLICATION=COMPLETE' in h_txt\\nfor p in (R/'manifest.json',R/'state/current.json',CLI,REF,PUB):assert p.exists(),p\\ndef atom(p,d):\\n p.parent.mkdir(parents=True,exist_ok=True);f,n=tempfile.mkstemp(dir=str(p.parent),prefix=p.name+'.')\\n with os.fdopen(f,'w',encoding='utf-8') as x:json.dump(d,x,ensure_ascii=False,indent=2);x.write('\\n')\\n os.chmod(n,0o640);os.replace(n,p)\\nM=json.loads((R/'manifest.json').read_text());X=['owners','vendors','contracts','procedures','disaster_recovery','change_management','config_references','coverage_gaps'];S=list(M.get('sections',[]))\\nfor x in X:\\n if x not in S:S.append(x)\\nM['sections']=S;M.setdefault('freshness_seconds',{}).update({x:86400 for x in X});M['updated_at']=datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0).isoformat();atom(R/'manifest.json',M)\\nfor l in ('declared','observed','effective'):\\n for s in S:\\n p=R/l/(s+'.json')\\n if not p.exists():atom(p,{'schema_version':2,'section':s,'layer':l,'updated_at':M['updated_at'],'records':[]})\\nA={'procedures':[{'id':'procedure-reference-operations','status':'ACTIVE','document':'OPERATIONS.md'},{'id':'procedure-reference-recovery','status':'ACTIVE','document':'RECOVERY.md'}],'disaster_recovery':[{'id':'dr-dual-mail-cloud-verification','status':'ENFORCED','two_independent_remote_integrity_confirmations_required':True}],'change_management':[{'id':'change-immutable-history','status':'ENFORCED','latest_pointer_authoritative':False,'exact_command_id_required':True}],'config_references':[{'id':'config-reference-policy','status':'ENFORCED','secret_values_allowed':False}],'coverage_gaps':[{'id':'gap-owners','section':'owners','status':'REQUIRES_DECLARATION'},{'id':'gap-vendors','section':'vendors','status':'REQUIRES_DECLARATION'},{'id':'gap-contracts','section':'contracts','status':'REQUIRES_DECLARATION'}]}\\nfor s,a in A.items():\\n p=R/'declared'/(s+'.json');q=json.loads(p.read_text());z={str(i.get('id')):i for i in q.get('records',[]) if i.get('id')}\\n for i in a:z[i['id']]=i\\n q['records']=[z[k] for k in sorted(z)];q['updated_at']=M['updated_at'];atom(p,q)\\nt=CLI.read_text()\\nif 'import subprocess\\n' not in t:t=t.replace('import shutil\\n','import shutil\\nimport subprocess\\n',1)\\nt=t.replace('%Y%m%dT%H%M%SZ','%Y%m%dT%H%M%S%fZ')\\nif 'def cmd_refresh(args):' not in t:\\n f='\\n'.join(['def cmd_refresh(args):',' subprocess.run([\\'/usr/local/sbin/homelab-reference-refresh\\'],check=True)','','def cmd_publish(args):',' subprocess.run([\\'/usr/local/sbin/homelab-reference-publish\\'],check=True)','','def cmd_rollback(args):',' target=(ROOT/\\'snapshots\\'/args.snapshot).resolve()',' base=(ROOT/\\'snapshots\\').resolve()',' if base not in target.parents or not target.is_dir(): raise SystemExit(\\'snapshot not found\\')',' pre=snapshot()',' for layer in LAYERS:',' src=target/layer',' if src.is_dir():',' dst=ROOT/layer',' if dst.exists(): shutil.rmtree(dst)',' shutil.copytree(src,dst)',' for section in sections(): merge_section(section)',' print(\\'pre_rollback_snapshot=\\'+str(pre))',''])\\n t=t.replace('parser = argparse.ArgumentParser',f+'\\nparser = argparse.ArgumentParser',1);t=t.replace('arguments = parser.parse_args()','p=sub.add_parser(\\'refresh\\');p.set_defaults(func=cmd_refresh)\\np=sub.add_parser(\\'publish\\');p.set_defaults(func=cmd_publish)\\np=sub.add_parser(\\'rollback\\');p.add_argument(\\'snapshot\\');p.set_defaults(func=cmd_rollback)\\narguments = parser.parse_args()',1)\\nCLI.write_text(t);os.chmod(CLI,0o750);py_compile.compile(str(CLI),doraise=True)\\nt=REF.read_text().replace('AUTO_REFRESH_READY','READY')\\nif 'next_action' not in t:t=t.replace(chr(34)+'status'+chr(34)+':'+chr(34)+'READY'+chr(34),chr(34)+'status'+chr(34)+':'+chr(34)+'READY'+chr(34)+','+chr(34)+'next_action'+chr(34)+':'+chr(34)+'NONE'+chr(34),1)\\nREF.write_text(t);os.chmod(REF,0o750);py_compile.compile(str(REF),doraise=True)\\nD=R/'docs';D.mkdir(exist_ok=True);(D/'MANUAL-DATA.md').write_text('# Manual data\\n\\nFill owners, vendors and contracts in the declared layer. Never store passwords, tokens, private keys or recovery codes.\\n');(D/'VALIDATION.md').write_text('# Validation\\n\\nStatus: READY\\nNext action: NONE\\n')\\nBS=pathlib.Path('/var/lib/gitea/custom/public/.well-known/homelab-bootstrap.json');assert BS.is_file() and json.loads(BS.read_text()).get('cluster_id')=='homelab'\\nH=pathlib.Path('/usr/local/sbin/homelab-reference-bootstrap-update');code='\\n'.join(['import datetime,hashlib,json,os,pathlib,sys,tempfile','r=pathlib.Path(\\'/etc/homelab/reference\\');p=pathlib.Path('+repr(str(BS))+');c=sys.argv[1];d=json.loads(p.read_text());u=\\'https://git.gram1.ru/homelab-admin/homelab-public-context/raw/commit/\\'+c+\\'/reference/index.json\\';d[\\'generated_at_utc\\']=datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0).isoformat().replace(\\'+00:00\\',\\'Z\\');d.setdefault(\\'entrypoints\\',{})[\\'cluster_reference_index_url\\']=u;d.setdefault(\\'operating_contract\\',{})[\\'load_cluster_reference_before_diagnostics\\']=True;d[\\'coverage\\']={\\'status\\':\\'READY\\',\\'missing\\':[],\\'manual_declaration_sections\\':[\\'owners\\',\\'vendors\\',\\'contracts\\']};d[\\'cluster_reference\\']={\\'status\\':\\'READY\\',\\'read_before_diagnostics\\':True,\\'layers\\':[\\'declared\\',\\'observed\\',\\'effective\\'],\\'public_commit\\':c,\\'public_index_url\\':u,\\'private_repository\\':\\'homelab-admin/homelab-cluster-reference-private\\'};d.setdefault(\\'context\\',{})[\\'reference_commit\\']=c;d[\\'context\\'][\\'reference_sha256\\']=hashlib.sha256((r/\\'public/index.json\\').read_bytes()).hexdigest();f,n=tempfile.mkstemp(dir=str(p.parent),prefix=p.name+\\'.\\');x=os.fdopen(f,\\'w\\');json.dump(d,x,ensure_ascii=False,indent=2);x.write(\\'\\\\n\\');x.close();os.chmod(n,p.stat().st_mode & 0o777);os.replace(n,p);print(\\'BOOTSTRAP_REFERENCE_UPDATE=PASS\\')'])\\nH.write_text(code);os.chmod(H,0o640);py_compile.compile(str(H),doraise=True)\\nt=PUB.read_text()\\nif 'homelab-reference-bootstrap-update' not in t:\\n q=chr(34)+chr(36)+'public_commit'+chr(34);ls=t.splitlines();i=next(i for i,x in enumerate(ls) if x.startswith('public_commit='));ls.insert(i+1,'/usr/bin/python3 /usr/local/sbin/homelab-reference-bootstrap-update '+q);t='\\n'.join(ls)+'\\n'\\nPUB.write_text(t);os.chmod(PUB,0o750)\\nsp=pathlib.Path('/etc/systemd/system/homelab-reference-refresh.service');t=sp.read_text();parent=str(BS.parent)\\nif parent not in t:t=t.replace('ReadWritePaths=/etc/homelab/reference /var/backups/homelab-reference','ReadWritePaths=/etc/homelab/reference /var/backups/homelab-reference '+parent)\\nsp.write_text(t);os.chmod(sp,0o644)\\nsubprocess.run(['systemctl','daemon-reload'],check=True);subprocess.run([str(CLI),'validate'],check=True);subprocess.run([str(CLI),'merge'],check=True);subprocess.run(['systemctl','enable','--now','homelab-reference-refresh.timer'],check=True);subprocess.run(['systemctl','start','homelab-reference-refresh.service'],check=True,timeout=700)\\nst=json.loads((R/'state/current.json').read_text());st.update({'status':'READY','next_action':'NONE','validated_at':datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0).isoformat(),'validation_command_id':C,'previous_command_id':P,'manual_declaration_sections':['owners','vendors','contracts']});atom(R/'state/current.json',st)\\no=subprocess.run([str(PUB)],stdout=subprocess.PIPE,stderr=subprocess.STDOUT,text=True,check=True,timeout=700).stdout;v=dict(x.split('=',1) for x in o.splitlines() if '=' in x);assert v.get('REFERENCE_PUBLICATION')=='PASS'\\nsubprocess.run([str(CLI),'validate'],check=True);assert subprocess.run(['systemctl','is-enabled','homelab-reference-refresh.timer'],stdout=subprocess.DEVNULL).returncode==0;assert subprocess.run(['systemctl','is-active','homelab-reference-refresh.timer'],stdout=subprocess.DEVNULL).returncode==0\\nb={}\\nfor i in range(15):\\n try:b=json.loads(F(B+'/.well-known/homelab-bootstrap.json?refresh='+str(time.time_ns())))\\n except Exception:b={}\\n if b.get('coverage',{}).get('status')=='READY' and v['PUBLIC_COMMIT'] in b.get('entrypoints',{}).get('cluster_reference_index_url',''):break\\n time.sleep(2)\\nassert b.get('coverage',{}).get('status')=='READY' and v['PUBLIC_COMMIT'] in b.get('entrypoints',{}).get('cluster_reference_index_url','')\\nassert json.loads((R/'state/current.json').read_text()).get('next_action')=='NONE'\\nprint('PREVIOUS_RESULT=VERIFIED');print('REFERENCE_SECTIONS='+str(len(S)));print('REFERENCE_CLI_COMMANDS=13');print('REFERENCE_TIMER=ACTIVE');print('PRIVATE_COMMIT='+v['PRIVATE_COMMIT']);print('PUBLIC_COMMIT='+v['PUBLIC_COMMIT']);print('STATUS=READY');print('NEXT_ACTION=NONE');print('CLUSTER_REFERENCE_READINESS=COMPLETE')''')\n ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^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