mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-05-07 11:58:21 +02:00
6bca92da4a
The cmd.run for psycopg2 install was already tolerating pip's non-zero exit with `|| true`, but pip's stderr — which contains the literal string "ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'patchelf'" — was still being captured into salt's state-result dict. so-setup logs salt state output to /root/sosetup.log, and verify_setup() then greps for the substring "ERROR" to build /root/errors.log. The patchelf line then shows up at the end of every install as "WARNING: Errors detected during setup" even though the install is in fact green. Redirect pip's combined stdout/stderr to /opt/so/log/so_pillar/psycopg2_install.log so the noise lives in a dedicated, predictable triage location instead of leaking into salt's state result. The `unless: import psycopg2` check is still the actual readiness gate, so a real install failure (rather than just the patchelf RPATH-rewrite step that has no functional effect on the wheel) would still surface via the state being re-run on every apply and `import psycopg2` failing.