Commit Graph

82 Commits

Author SHA1 Message Date
Marius
015cd797a1 fix(oracle): SYS.INFO iese din SYSTEM + job de purjare + diagnostic spatiu clienti
SYS.INFO e log de aplicatie (SYS.pINFO din AUTH_PACK scrie ~7 randuri la fiecare
conectare, ~13.500 randuri / ~2 MB pe luna) si nimic din baza nu-l citeste. Creat
de installer in tablespace-ul SYSTEM si nepurjat niciodata, a umplut SYSTEM la doi
clienti si a oprit actualizarea cu ORA-01653 - eroarea apare pe orice script,
pentru ca AUTH_PACK scrie acolo la conectare.

  SIGMA      03.08.2026 - ff_2026_07_29_02_COMUN_TVA11 picat pe MARCU
  AUTOMOTIVE 08.08.2026 - 552.581 randuri / 80 MB, SYSTEM cu 5 MB liberi

Installer:
- sys-objects.sql: SYS.INFO (tabela + segment LOB) se creeaza in tablespace-ul
  ROA, cu fallback pe SYSTEM daca ROA inca nu exista
- scheduler-jobs.sql: job nou SYS.SYSINFO_PURJARE_ZILNIC, zilnic 03:30, retentie
  90 zile, stergere in transe de 10.000 randuri; creat ENABLED, pentru ca nu are
  nimic de configurat iar uitat dezactivat reproduce chiar problema pe care o
  rezolva. In schema SYS: privilegiile ANY nu se aplica pe obiectele SYS cat timp
  O7_DICTIONARY_ACCESSIBILITY=FALSE
- uninstall-roa.sql: dezinstalarea sterge si jobul
- 00-INSTALL-ORACLE-XE.md / -SE.md: pas post-instalare pentru plafonul SYSTEM
  (maxsize 2000M) si mutarea SYS.INFO la instalarile vechi

Documentatie noua (docs/diagnostic-spatiu-clienti.md): jobul DIAGSPATIU_ZILNIC si
pragurile lui, formatul emailurilor de alerta si cum se citesc din mbox-urile
Thunderbird, procedura de tunel SSH catre serverul unui client, triajul alertelor
si starea la 08.08.2026 pe fiecare client.

Reparatia la AUTOMOTIVE e deja aplicata in productie (plafon 600 -> 2000 MB,
truncate SYS.INFO): SYSTEM a trecut de la 65 MB la 1545 MB de crestere posibila.
Scriptul de livrare pentru ceilalti clienti e scris, dar nepublicat:
COMUN sys_2026_08_08_02_SYS_INFO_TABLESPACE_PURJARE.sql

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rft5ofNa4Ux5VEh4YnhJRC
2026-08-08 17:38:54 +03:00
Marius
dabe5a34e3 feat(dr): script de deploy pentru scripturile DR + documentare procedura
Pana acum deploy-ul se facea manual (`cp ... /opt/scripts/`), nedocumentat
nicaieri - de unde si fisierele weekly-dr-test-proxmox.sh.bak-* ramase pe
pveelite. deploy.sh face aceiasi pasi, dar refuza situatiile care au costat
deja timp:

- suprascrierea unui script AFLAT IN EXECUTIE: bash citeste scriptul
  incremental de pe disc, iar suprascrierea unui test DR in curs (~18 min)
  corupe executia;
- CRLF: bash pe Linux raspunde "$'\r': command not found";
- transfer trunchiat: bash -n local si inca o data pe nod dupa copiere;
- flag-ul vm109-debug.flag lasat in urma dupa deploy pe guest (dezarmeaza
  permanent watchdog-ul, exact apararea care a prins incidentul 04-20).

Distributia pe noduri e asimetrica intentionat si e codificata explicit in
script: scripturile cluster-aware (test DR, patch window, watchdog) pe ambele
noduri fiindca urmaresc VM 109 dupa failover HA; ZFS/mirror doar pe pveelite
unde traieste datasetul; alertele si failover-ul doar pe pvemini, fiindca
reactioneaza la caderea pveelite - puse pe pveelite ar fi inutile si ar
inlesni exact split-brain-ul pe care incearca sa-l previna.

Verificarea "ruleaza acum" foloseste pgrep -f '[/]opt/scripts/x.sh'.
Parantezele nu sunt cosmetice: comanda trimisa prin ssh apare ea insasi in
lista de procese, deci forma fara paranteze se gaseste pe sine si raporteaza
orice script ca fiind in executie (verificat: exit 0 vs exit 1).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BhQBTegE4PiMPPaapLHjkc
2026-08-08 17:19:03 +03:00
Marius
94758421c5 fix(dr): Windows Update rebota VM 109 in mijlocul testului DR
Testul DR din 2026-08-08 a raportat "Restore failed" dupa 11 secunde, fara
niciun log RMAN. Cauza nu a fost restore-ul: KB5101001 fusese descarcat in
timpul testului din 2026-08-01 (singurul moment in care VM 109 e pornit),
a ramas staged dupa qm stop si s-a finalizat la boot-ul testului urmator.

Cronologie din Event Log-ul guest-ului:
  06:00:58  RestartManager 10010 - nu poate reporni powershell.exe (restore-ul)
  06:01:04  SCM 7034 - OpenSSH SSH Server terminat neasteptat
  06:01:06  pveelite: client_loop: send disconnect: Broken pipe -> FAILED
  06:01:38  VM-ul se reboteaza singur

Fereastra testului (Sambata 06:00) era in afara Active Hours (08:00-17:00),
deci pentru Windows era fereastra de mentenanta valida - iar VM 109 fiind
pornit doar in timpul testului, aceea era singura fereastra posibila.
Agravant: sshd nu avea acsiuni de recovery (RESET_PERIOD 0), deci dupa ce a
murit a ramas mort si au esuat si colectarea logului si shutdown-ul gratios.

Masuri:
- NoAutoUpdate=1 + AUOptions=2 pe VM 109 (aplicat direct in registry)
- actiuni de recovery pentru sshd: restart la 5s/10s/30s, reset=86400
- guard "STEP 3b: Windows servicing" inainte de restore (check_servicing.ps1):
  asteapta idle 300s, consuma controlat un reboot in asteptare, altfel
  abandoneaza cu "ABORTED - Windows servicing" in loc de un "Restore failed"
  inselator. Fail-open daca checkul lipseste - nu are voie sa pice testul.
- fereastra lunara de patching (vm109-patch-window.sh + install_updates.ps1),
  prima duminica 03:00, cu re-armare NoAutoUpdate=1 indiferent de rezultat

Adaugat si .gitattributes: cu core.autocrlf=true scripturile .sh ajungeau in
working tree cu CRLF, iar ele se deployeaza prin scp direct pe Proxmox.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BhQBTegE4PiMPPaapLHjkc
2026-08-08 16:56:24 +03:00
Claude Agent
e72c1f9f48 docs(lxc102): installer + procedură de replicare pentru sbt/statusline
- scripts/install-sbt.sh: instalare idempotentă (scripturi + statusline +
  patch settings.json) cu verificări de mediu
- README: replicare de la zero (transfer prin pct exec, installer, sandbox,
  ce se pierde la recrearea sandbox-ului), verificare rapidă, căi noi

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 11:38:40 +00:00
Claude Agent
0729010284 fix(lxc102): sbt nu mai lansează agent implicit + fix warning docker hub lock
- fără agent implicit: ambele pane-uri sunt shell în sandbox, agentul se
  pornește manual; argumentul 3 rămâne pentru lansare explicită
- al doilea pane intră în sandbox cu 4s întârziere (SBT_PANE_DELAY):
  două `sbx exec` simultane se calcă pe lock-ul de refresh Docker Hub și
  scot "could not acquire docker hub refresh lock"

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 11:35:55 +00:00
Claude Agent
6ff2c6ee2c feat(lxc102): script tmux sbt pentru sandbox + statusline Claude Code
- sbt: sesiuni tmux (sbx1..3) care intră în sandbox și lansează agentul
  (claude/opencode/orice binar); tmux rulează pe host, panes prin sbx exec
- statusline.sh + bootstrap-statusline.sh pe /home/workspace/.agent
  (virtiofs persistent), reinstalat la fiecare intrare fiindcă /home/agent
  din sandbox e overlay efemer
- fix printf "--" -> printf -- "--" (eroare de usage când API-ul de cote
  nu răspunde)
- copii versionate ale scripturilor agents/sb + documentație README

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 11:13:55 +00:00
Claude Agent
a6b26ba23d docs(lxc102): OOM cronic pe 4GB -> 12GB + refresh tabel resurse cluster
Alerta "OOM x2 on pvemini" (09:36) arata procese mici ucise (dbus-daemon,
oom_score_adj:200), dar mesajul kernel dadea containerul real:
oom_memcg=/lxc/102. OOM local containerului, nu presiune de host - pvemini
avea 24Gi disponibili si zram functional.

Baseline masurat cu ZERO sandbox-uri active: ~1.9GB (sbx 863M + claude 317M +
VS Code Remote 450M + docker/tailscale/portainer 205M). Un sandbox real mai
adauga ~1.9GB (containerd-shim) -> plafonul de 4GB era depasit sistematic.
Contoare cumulate: oom_kill 24, 9279 depasiri memory.high, memory.peak fix pe
limita, swap 510/512 epuizat.

Verificat explicit ca sbx NU are memory leak: RSS urca la ~863M la pornire si
se plafoneaza (esantionat la 10s timp de un minut).

Fix: pct set 102 --memory 12288 --swap 4096 (live, fara restart).

Tabelul de resurse din cluster/README.md era vechi (102 aparea ca "coolify
stopped", lipseau 110 si 171, RAM gresit peste tot) - regenerat din pvesh.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 10:23:10 +00:00
Claude Agent
1df533edba docs(lxc110): incident DNS/OOM 2026-07-31 + zram pe pve1 + limite TTS
LXC 110 (moltbot) a picat dupa un OOM local containerului urmat de reboot:
tailscaled a ramas delogat, iar containerul mostenea resolv.conf-ul Tailscale
de la host-ul pve1 (doar MagicDNS 100.100.100.100) -> rezolutie DNS zero desi
L3 era functional -> echo-core in crash-loop pe telegram.error.TimedOut.

Fixuri aplicate:
- pct set 110 --nameserver '10.0.20.1 1.1.1.1' (elimina dependenta de Tailscale)
- zram-tools pe pve1 (8G zstd, prio 100) - `swap: 4096` din config era fictiv,
  host-ul nu avea niciun swap; root pe ZFS deci zram, nu swapfile
- MemoryHigh/MemoryMax pe pocket-tts + supertonic-tts - toate serviciile user
  rulau cu limite `infinity`, de unde OOM-uri recurente (Apr 25, May 28 x4)
  cu victime aleatorii alese dupa oom_score_adj

Documentatie:
- nou post-mortem in cluster/incidents/, adaugat in indexuri
- README lxc110: host corectat pveelite -> pve1 (+ RAM/CPU/storage reale),
  comenzile pct redirectionate spre nodul corect
- README lxc171: tabel cu starea swap pe cele 3 noduri (pveelite are zvol,
  nu zram - nu necesita acelasi fix)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 10:14:54 +00:00
Claude Agent
874698a242 docs(lxc102): Docker + Portainer + Docker Sandboxes (sbx)
Documentează LXC 102 și depanarea erorii "500: failed to run sandbox
container" la crearea sandbox-urilor opencode: build docker-sbx pentru
Ubuntu 26.04 instalat pe Debian 13 (libsailor.so cere GLIBC_2.43),
userul work lipsă din grupul kvm și /usr/sbin absent din PATH
(mkfs.ext4 pentru snapshotter-ul erofs).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 19:27:45 +00:00
Marius
4a73d0dd39 docs(lxc103): autopass - env vars noi obligatorii + fix DB readonly (uid non-root)
Documentate doua probleme intalnite la deploy: variabile env noi
(AUTOPASS_RAR_ENV, AUTOPASS_SESSION_SECRET, AUTOPASS_WORKER_SEND_ENABLED)
devenite obligatorii in docker-compose.yml fara actualizare in Dokploy,
si crash-loop api/worker cu "readonly database" dupa ce imaginea a trecut
la user non-root (uid 10001) fara chown pe volumul SQLite existent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 14:15:45 +03:00
Claude Agent
fef7ff472e docs(lxc101): minecraft Crafty + ghid actualizare versiune (Java 25)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 17:48:47 +00:00
Claude Agent
bcc2592f23 docs(lxc103): staging autopass-test.roa.romfast.ro
Flux de lucru pentru mediu staging autopass: un branch = un environment
(main->prod, staging->test), serviciu Dokploy separat autopass-test, domeniu
via wildcard *.roa (fara IIS/cert nou), env care opreste trimiterile reale la
RAR. Link incrucisat din autopass.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 16:44:25 +00:00
Claude Agent
334d408ca9 feat(autopass): domeniu public autopass.romfast.ro + decom roa-qr
- IIS site dedicat 'autopass' (ID 7) pe VM201 → proxy Traefik LXC103,
  cert win-acme HTTP-01 selfhosting + install IIS (auto-renew/auto-bind)
- monitor-ssl-certificates.sh: +autopass.romfast.ro (ID 7), -roa-qr (decom)
- doc autopass.md: setup domeniu public + pasul Dokploy (Add Domain + redeploy)

roa-qr.romfast.ro decomisionat (migrat la qr.roa.romfast.ro, acoperit de wildcard):
site IIS + dir + cert + renewal win-acme eliminate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 15:07:57 +00:00
Claude Agent
789d127733 docs(lxc103): autopass deploy guide + probleme primul deploy
- ghid deploy Dokploy (Custom Git, autodeploy webhook, domain via roa-apps wildcard)
- probleme intampinate: Gitea Unauthorized, api crash-loop (itsdangerous lipsa), 303 /login
- link in indexul docs din README

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 22:26:01 +00:00
Claude Agent
525919926c fix(vm201): roa-qr cert auto-renew + add to SSL monitor
Cauza ERR_CERT_DATE_INVALID pe roa-qr.romfast.ro: renewal-ul win-acme
avea Installation plugin "None" in loc de IIS -> certul se reinnoia in
store dar binding-ul SNI ramanea pe certul vechi (expirat 31 mai).

- monitor-ssl-certificates.sh: adaugat roa-qr.romfast.ro (Site ID 5);
  normalizat CRLF->LF (CRLF dadea exit 127 la exec pe Linux)
- docs: box incident 2026-06-25 cu cauza-radacina + diagnostic per renewal

Fix aplicat pe VM 201: plugin install None->IIS in renewal.json + force
renew (cert nou valid pana 23 sep 2026, binding auto-actualizat).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 14:01:00 +00:00
Claude Agent
a41e9d81cf feat(vm201): wildcard *.roa auto-renew via cPanel DNS-01 hook
Fix expirare cert wildcard *.roa.romfast.ro (incident 2026-05-31):
renewal-ul era [Manual] DNS-01, nu rula din Scheduled Task -> 61 erori
-> expirat. Subdomeniile Dokploy (efactura.roa etc.) dadeau
ERR_CERT_DATE_INVALID.

- cpanel-acme-dns.ps1: hook win-ACME DNS-01 (cPanel UAPI mass_edit_zone,
  fallback ZoneEdit) care pune/sterge TXT _acme-challenge automat
- cpanel-dns.config.example.json: template (token-ul real e gitignored)
- monitor-ssl-certificates.sh: sentinel efactura.roa (wildcard) + alerta
  in loc de auto-renew prin guest-exec (dezactivat)
- README + doc cert: flux DNS-01 cPanel + acces OpenSSH VM 201

Renewal nou roa-wildcard-cpanel, auto, due 2026-08-19; vechiul [Manual]
anulat. Cert live valid pana 2026-09-23.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 13:23:54 +00:00
Claude Agent
e8d1889364 docs(lxc171): add reap-orphans cron + zram swap anti-OOM
Incident 2026-06-24: OOM-uri repetate în cgroup /lxc/171 cauzate de swap
nebacked pe host (pvemini fără swap) + acumulare de forks vscode-server
orfane și sesiuni logind zombie.

- scripts/reap-orphans.sh: reaping conservator (forks ~/.vscode-server
  orfane >24h + sesiuni closing cu leader mort), rulat din cron la 6h
- README: secțiune Memorie & OOM (zram pe host ZFS, reaper, diagnostic),
  corectat date stale host/RAM/CPU (pvemini, 16GB, 4 cores)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 13:13:09 +00:00
9e0e35661e feat(vadeco): script bat copiere lunara date contabilitate
Script Windows interactiv pentru client VADECO_20240227:
- verificare TCP port 1521 (fail-fast fara tunel SSH)
- verificare calendar Oracle: deschidere luna noua (tnDeschidere=1)
  sau redeschidere cu avertisment stergere date (tnDeschidere=0)
- apel ACOPIE_BAZA_DATE + pack_deschidere_luna.deschidere_luna
- mod Dry Run (afiseaza SQL fara executie) si suport argumente CLI
- valori implicite: anul si luna anterioara curenta

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 12:32:20 +03:00
Claude Agent
2e7f337a5b docs(lxc108): add import test guide + ACN export parfile
Procedura completa import DMP client pentru teste in LXC 108 Oracle 21c.
Parfile expdp ACN cu tabele mari excluse (40 tabele, ~2.4GB date excluse).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 07:33:06 +00:00
Claude Agent
679719c295 docs(cluster): document notification targets + cron stdout rules
- Proxmox default-matcher acum trimite doar la mail-to-root (pve1 smtp
  eliminat din matcher → fix emailuri duble pentru backup/vzdump)
- Adaugat tabel cron jobs per nod cu motivul redirect-ului > /dev/null
- Regula: scripturi cu propriile notificari trebuie sa aiba redirect in
  crontab, altfel cron genereaza email suplimentar de confirmare

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 05:50:34 +00:00
Marius
3ded5d3f2f docs(cluster): incident pvemini backup SSD hang + thermal monitoring
Documenteaza incidentul Kingston SNV3S2000G hang la 2026-04-30 (Sensor 2
74°C → emergency mode + restart loop) si masurile aplicate: distantare
temporala backup-uri par/impar, mutare CT 101+110 pe pve1 backup-ssd,
nofail in fstab, hardware watchdog iTCO_wdt, monitoring CSV la 30 min.

Adauga scripturile /opt/scripts/kingston-thermal-{monitor,report}.sh
pentru tracking trend si alertare la depasirea pragurilor termale.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 01:04:02 +03:00
Claude Agent
2109bc7f5e chore: add .playwright-mcp to .gitignore + docs depanare 502 dokploy
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 09:37:59 +00:00
Claude Agent
bb91d06e4b docs(lxc103): add git workflow and auto-deploy webhook configuration
Documentat fluxul complet modificare → redeploy: manual vs auto-deploy
prin webhook Gitea/GitHub. Tabel repo-uri curente per serviciu.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:06:07 +00:00
Claude Agent
8f4f049e58 docs(lxc103): add Dokploy service types guide + deployment workflows
Documentat cele 3 tipuri de servicii (Application/Compose/Database),
tabel comparativ, pași UI pas-cu-pas pentru fiecare tip, și când să
alegi fiecare variantă. Include cerințe obligatorii docker-compose.yml
și nota despre înregistrarea domeniilor prin UI vs labels.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:03:28 +00:00
Claude Agent
ffe3806d43 docs(lxc103): document overlay network race condition + heal script fix
Bug confirmat Dokploy #2033 + docker/compose #12862: Docker Compose containers
cu external overlay network pică la restart Docker (exit 128, network not found).
Documentat cauza, fix-ul generic dokploy-compose-heal.service și fix-ul DNS daemon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 11:54:53 +00:00
Claude Agent
e08ffb1b68 docs(vm201): document ROA + CONTAFIN update server (IIS apps)
Adds vm201-roa-update-server.md describing the two IIS virtual apps under
roa.romfast.ro that distribute application updates to ROMFAST clients:

- /roaupdate -> D:\ROAUPDATE: per-client VFP XML manifests, _ARHIVE ZIPs
  for 35+ ROA modules (ROACONT, ROAFACTURARE, ROAGEST, etc.), SVN-backed
  DB scripts, xmlupdatecreator workflow.
- /contafinupdate -> D:\APPUPDATESERVERAVFP: ActiveVFP server with
  AVFPHandler for *.avfp requests, VFP9 runtime.

Also captures the full IIS site inventory (Default Web Site, ROA2WEB,
Dokploy, Gitea, roa-qr, roa-apps) verified live on 2026-04-25, and lists
the configured client manifests (ROMFAST, ROMPETROL, ARGENTA, etc.).

Cross-references added in proxmox/README.md and vm201-windows/README.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 22:14:05 +00:00
Claude Agent
21f1e9affe docs(vm201): add btgo-playwright Windows service documentation
Document the BT George scraper running on VM 201:
- Python + Playwright SDK (HEADLESS=false required for WAF bypass)
- Windows Service deploy with Telegram notifications
- Cross-references in proxmox/README.md and vm201-windows/README.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 22:08:48 +00:00
Claude Agent
8846c9c855 docs(dr): document failback DR -> PRIMARY procedure + restore script
Adds end-to-end procedure for moving production back from DR (10.0.20.37)
to a repaired/reinstalled PRIMARY (10.0.20.36): final RMAN backup on DR
in restricted/read-only mode, RMAN restore on PRIMARY, app connection
switch, scheduled-task reactivation, VM 109 stop. Companion PowerShell
script handles the restore with sanity checks (IP, NFS, backup freshness)
and aborts if Oracle major version != 19, since failback to 21c would
need an extra dictionary upgrade step (~30-60 min) that adds untested
risk during the critical window — recommended path is 19c failback then
upgrade later in a planned window.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 20:18:09 +00:00
Claude Agent
2ee51c7318 docs(clienti): index ROMPETROL ENERGY ORA-12954 PDB recreation case
Add a top-level case index at lxc108-oracle/clienti/README.md and a
narrative README inside oracle-xe-21c/ that names ROMPETROL ENERGY
explicitly, describes symptom -> diagnostic -> what failed -> what
worked, and lists each numbered SQL with its role in the import phases.

Wire the case into discoverable entry points:
- proxmox/lxc108-oracle/README.md: new "clienti/" subsection
- proxmox/README.md: tree + nav links
- /workspace/romfastsql/CLAUDE.md: entry points

Future "Rompetrol Energy" / "ORA-12954" / "recreare PDB" searches now hit
the docs from the master indices instead of via grep on schema name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:48:18 +00:00
Claude Agent
e852df1a59 docs(oracle): move clienti/ under lxc108-oracle/
clienti/ contained Oracle XE 21c troubleshooting and PDB recreation
scripts. Moving it under proxmox/lxc108-oracle/ keeps Oracle migration
material colocated with the Oracle host docs. Update the two relative
links in roa-windows-setup that pointed to the old location.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:44:39 +00:00
Claude Agent
44b3c0da60 docs(vm302): split test env into dedicated dir, mark SE 21c as TODO
Move VM302-TESTING.md from lxc108-oracle/roa-windows-setup/test/ into a
new proxmox/vm302-oracle-test/ directory (sibling of vm109/vm201) so the
test environment is documented separately from the setup scripts. Add a
dual-edition test plan (XE validated / SE TODO) and a stub for capturing
the production SE errors next time they reproduce.

Cross-link from roa-windows-setup/README.md, proxmox/README.md master
index and CLAUDE.md entry points. Setup scripts stay in lxc108-oracle —
they are not VM-specific.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:40:38 +00:00
Claude Agent
1d67f0705b docs(dr): refresh README with post-2026-04-25 architecture
VM 109 returned to its original home on pveelite, co-located with
oracle-backups NFS storage. The README is updated to reflect that:
the VM is now in HA (ha-prefer-pveelite, state=stopped, nofailback=1)
rather than excluded from HA, and the new layered defences (trap
guard, watchdog cron, dynamic memory pre-flight, max_restart caps)
are documented alongside the original 8a0c557 trap.

Adds a Storage Failover section describing the pveelite -> pvemini
manual failover flow: email alert from pveelite-down-alert.sh,
failover-dr-to-pvemini.sh on the surviving node, failback when
pveelite returns. The pve1 nightly mirror is the third copy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:19:38 +00:00
Claude Agent
b7fffe1467 feat(dr): manual failover/failback scripts + pveelite-down email alert
failover-dr-to-pvemini.sh and failback-dr-to-pveelite.sh promote/demote
the rpool/oracle-backups dataset between nodes when pveelite is down.
Both refuse to run if the other side is reachable to prevent split-brain.
Both patch transfer_backups.ps1 on Oracle Production (10.0.20.36) via
SSH to redirect the daily SCP target between 10.0.20.202 and 10.0.20.201.

The PowerShell patch uses -EncodedCommand (UTF-16LE base64) so the bash
caller does not need to escape PowerShell quoting. End-to-end test
including failover -> failback confirmed transfer_backups.ps1 returns
to byte-identical state (SHA256 43DD2187...).

pveelite-down-alert.sh runs every minute on pvemini and emails an alert
with copy-paste failover instructions after 5 consecutive ping failures.
The alert body includes the latest oracle-backups and VM 109 replica
timestamps so the operator knows the recovery point before deciding.

The DR weekly-test script gains a cluster-aware guard at the top that
exits silently when /etc/pve/qemu-server/109.conf is not on the local
node, allowing the same cron entry to be present on both pveelite and
pvemini without double-firing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:18:51 +00:00
Claude Agent
a62bcb4331 feat(dr): replicate oracle-backups dataset, mirror to pve1 nightly
Convert /mnt/pve/oracle-backups from a directory on the pveelite
rootfs into a dedicated ZFS dataset rpool/oracle-backups so it can be
incrementally replicated to pvemini. zfs-replicate-oracle-backups.sh
runs every 15 minutes from cron on pveelite and uses zfs send/recv
over the cluster's internal SSH (direct IP, /etc/pve/priv/known_hosts)
to avoid Tailscale magicDNS detours that broke the first attempt.
The destination dataset is set readonly=on so accidental writes on
pvemini cannot diverge it. Snapshot pruning keeps 5 rolling copies.

nightly-backup-mirror.sh ships a third copy nightly to pve1's
backup-ssd (ext4 SATA) — different physical disk, different
filesystem, different node — guarding against the failure mode where
both pveelite and pvemini are simultaneously unavailable. The same
script tars /etc/pve and rotates 14 days of cluster config archives,
since pmxcfs is in-RAM and a multi-node quorum loss would otherwise
take cluster config with it.

The old directory is kept as oracle-backups.old-DELETE-AFTER-2026-05-02
on pveelite for one week as a safety net.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:00:04 +00:00
Claude Agent
62e9926bd4 feat(dr): add cluster + memory pre-flight, deploy VM 109 watchdog
DR test script now refuses to start VM 109 if:
  * cluster is not quorate (e.g. mid-failover into a degraded state),
  * available memory on the host is below VM 109 config + 1 GB margin.

Both checks scale automatically — memory threshold is computed from
qm config so resizing VM 109 does not require touching the script.

Adds vm109-watchdog.sh, scheduled cluster-wide every minute. The
watchdog is the second line of defence behind the cleanup trap from
8a0c557: it force-stops VM 109 if the trap was bypassed (script
killed, host crash mid-test, manual run forgotten). It honours
/var/run/vm109-debug.flag for legitimate manual sessions and is
node-aware via /etc/pve/qemu-server/109.conf so it can be deployed
on every node without coordinating with VM 109's current location.

Both safeguards target the 04-18 → 04-20 chain: VM 109 left running
2.5 days then sandwiched against an HA failover that pushed CT 108
Oracle (8 GB) onto pveelite (16 GB) → OOM cascade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 18:48:12 +00:00
Claude Agent
2e8cd9ca59 fix(dr-test): guard cleanup trap + surface qm start errors
The cleanup trap added in 8a0c557 stopped VM 109 unconditionally on EXIT,
which kills the VM during --install/--help or when an operator launched
it manually for debugging. Gate the trap with DR_VM_STARTED_BY_US so it
only fires when the script itself started the VM.

Also remove the 2>/dev/null swallow on qm start so cross-node failures
(e.g. running on a node where the VM is not configured) appear in the
log instead of producing a silent "Failed to start VM 109" in 0 seconds.

Root cause for the 2026-04-25 silent failure: cron lived on pveelite
while VM 109 had been migrated to pvemini; qm start returned an error
that was hidden by the redirect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 08:47:54 +00:00
Claude Agent
8a0c557981 feat(failover): add VM 201 manual failover + recovery scripts, watchdog alert
VM 201 (Windows critical) stays out of HA by design. Added:
- failover-vm201.sh: interactive failover pvemini -> pveelite with ZFS replication state
- recover-vm201-to-pvemini.sh: interactive reverse migration with uptime + split-brain checks
- pvemini-down-alert.sh: cron watchdog on pveelite, emails full runbook after 2min DOWN

Replication RPO tightened: CT 108 + VM 201 to 5min, CT 171 to 15min.
CT 171 added to HA (ha-group-main) for continuous Claude Code access.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 12:40:49 +00:00
Claude Agent
1203c24d63 docs(proxmox): document HA, corosync tuning, diagnostic tools and mail relay
Following the 2026-04-20 cluster outage, the cluster README now covers
HA resource limits, corosync token tuning (10s tolerance for USB glitches),
rasdaemon/netconsole/kdump diagnostic stack on pvemini, mail relay via
mail.romfast.ro with SMTP auth, OOM alerting via cron, and swap on pveelite.

VM 109 README now clearly states it was removed from HA and is only
started by the weekly DR test script.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 11:30:46 +00:00
Claude Agent
60c27e7232 fix(vm109-dr): trap cleanup to stop VM 109 on script exit
The DR test script used set -euo pipefail, so a failing SSH
shutdown command caused the script to exit before qm stop.
On 2026-04-20 this left VM 109 running for 2.5 days and
triggered an OOM cascade when pvemini HA-failed over to
pveelite.

Adds EXIT trap that force-stops VM 109 regardless of exit
path, and makes the Step 7 SSH shutdown tolerant of failure.
Incident details: proxmox/cluster/incidents/2026-04-20-cluster-outage.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 11:16:04 +00:00
Claude Agent
6410339196 feat(clienti): add Oracle XE PDB recreare scripts and audit cleanup
- Complete PDB export/import workflow (16 scripts in clienti/oracle-xe-21c/import/)
- Recreare PDB script with step-by-step guide (recreare_pdb.sql)
- Universal audit cleanup script for Oracle XE 11g-21c (cleanup_audit.sql)
- Troubleshooting guide with all lessons learned (depanare-ora-12954-spatiu.md)
- Fixed: DIRECTORY grant syntax, DBMS_LOCK grant, remap_tablespace USERS:ROA,
  impdp quoted AS SYSDBA for Windows, AWR retention 8 days, datafile full path
- Updated roa-windows-setup docs with XE prevention steps and gotchas table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:31:17 +00:00
Claude Agent
36c6405c21 docs(infra): add space-booking deploy guide and Gitea LXC 106 docs
- Add proxmox/lxc106-gitea/README.md: app.ini editing, Docker restart,
  webhook ALLOWED_HOST_LIST fix (hairpin NAT), troubleshooting
- Add proxmox/lxc103-dokploy/docs/space-booking-app.md: full deploy
  guide with env vars, auto-seed accounts, SMTP, troubleshooting
- Update proxmox/README.md: add LXC 106 entry and quick start
- Update lxc103-dokploy/README.md: add space.roa.romfast.ro in
  domains table, ASCII architecture, and docs links

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 16:31:00 +00:00
Marius
13114ef41d feat(oracle): add OS script execution procedures and Oracle locations finder
- ExecuteScriptOS.prc: runs PowerShell scripts via DBMS_SCHEDULER
- UpdateSQLPLUS.prc: runs SQL*Plus scripts via DBMS_SCHEDULER
- find_oracle_locations.sql: comprehensive script to discover all Oracle DB paths for backup/migration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 14:05:46 +02:00
Claude Agent
2ca27aefc6 docs(lxc103): document Docker Swarm VIP DNS fix with dnsrr
Add section explaining the root cause (IPVS broken in LXC), the
solution (dnsrr endpoint mode), and the dokploy-dnsrr-fix systemd
service that auto-applies the fix on every Dokploy deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 15:46:13 +00:00
Claude Agent
fcf1e06c66 feat(infra): add Dokploy LXC 103 and new IIS web domains
- Add LXC 103 Dokploy infrastructure (v0.28.2) with Traefik
- Deploy pdf-qr-app and qr-generator via Dokploy from GitHub
- Configure IIS VM 201: roa-qr and *.roa.romfast.ro wildcard sites
- Add SSL certificates (Let's Encrypt + wildcard DNS challenge)
- Fix Docker Swarm VIP DNS issue with dnsrr endpoint mode
- Document architecture: IIS → Traefik → Dokploy containers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 15:44:53 +00:00
Claude Agent
ae325d33b6 Update LXC 110 MoltBot: OpenClaw v2026.2.9 și RAM 4GB
Modificări după upgrade MoltBot → OpenClaw:
- RAM crescut de la 2GB la 4GB (minim recomandat pentru OpenClaw)
- Versiune actualizată: OpenClaw v2026.2.9 (fost MoltBot v2026.1.24-3)
- Adăugat troubleshooting pentru OOM kill issues
- Curățate sesiuni vechi (85 → 80)

Problema rezolvată: Gateway-ul era omorât de OOM killer din cauza
memoriei insuficiente (975MB peak cu doar 2GB RAM total).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 08:30:48 +00:00
Marius
3402d7fffa Add LXC 110 MoltBot documentation and infrastructure setup
- Create proxmox/lxc110-moltbot/ with complete README documentation
- MoltBot AI chatbot with Telegram and WhatsApp channels
- Claude Opus 4.5 model integration via Anthropic API
- Security: dedicated moltbot user, UFW firewall, fail2ban, Tailscale SSH
- Gateway on port 18789 (loopback), token+password auth
- Update proxmox/README.md with LXC 110 quick start and navigation
- Update CLAUDE.md network layout with MoltBot entry

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:46:21 +02:00
Marius
f50bfcf8d8 Fix DMPDIR handling and datafile auto-detection for ROA Windows setup
- New-OracleDirectory: Improved verification with direct SQL check, preserves
  existing DMPDIR path instead of blindly recreating
- Get-DatafilePath: Better fallback logic using ORACLE_HOME to derive path,
  no longer hardcodes C:\app\oracle
- grants-public.sql: Fixed DMPDIR creation - now preserves existing path
  instead of overriding with wrong D:\Oracle\admin\ORCL\dpdump
- config.example.ps1: Added DATAFILE_DIR parameter with documentation

These fixes ensure scripts work without manual intervention on fresh Oracle XE
installations where default DMPDIR points to non-existent paths.

Tested on VM 302 - full installation (01-08) now completes successfully.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:38:54 +02:00
Marius
709c822e38 Fix DMPDIR path detection and add VM302 testing documentation
- New-OracleDirectory now checks if DMPDIR exists with wrong path
- If path differs from target, drops and recreates the directory
- Fixes Oracle XE issue where DMPDIR defaults to D:\Oracle\admin\ORCL\dpdump
- Added VM302-TESTING.md with complete testing workflow documentation
- Includes Proxmox VM management commands, troubleshooting, and deployment steps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:09:06 +02:00
Marius
ed3f5f2c43 Simplify config.example.ps1 with default values
- SYSTEM_PASSWORD: romfastsoft
- CONTAFIN_PASSWORD: ROMFASTSOFT (uppercase)
- COMPANY_PASSWORD: ROMFASTSOFT (uppercase)
- SERVICE_NAME: XEPDB1
- DMPDIR: C:\DMPDIR
- ROAUPDATE_BASE_PATH: D:\ROAUPDATE

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:50:23 +02:00
Marius
ef1e40675f Fix ROA Windows setup scripts discovered during VM 302 testing
- 03-import-contafin.ps1: Auto-detect DMP file when not specified
- 05-import-companies.ps1: Default DumpDirectory to C:\DMPDIR
- 08-post-install-config.ps1: Fix SERVER_INFO column names (NAME/VALUE)

Tested full installation on VM 302 (Oracle XE 21c):
- CONTAFIN_ORACLE: 344 objects imported
- CAPIDAVATOUR: 3418 objects imported
- 54 ROAUPDATE directories created
- Scheduler jobs configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:42:39 +02:00