You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] FixVerifier checks services on the agent host instead of the target server #193
tools/fix_verifier.py checks whether a service came back with platform.system() and a local subprocess.run(["systemctl", "is-active", …]) (or sc query on Windows). That checks the machine running the agent, not the server that was fixed. With the centralized agent (SSH targets, SSH_REMOTE_USER), verification of a server fix:
reports "running" when a service of the same name happens to run on the agent host, or
reports failure (and escalates) when the agent host simply doesn't have that service.
Either way, resolved can be wrong. #19 fixed the same mistake in the server collector, which now detects the target's OS over SSH.
Proposed fix
Pass the incident's target host into the verifier and run the check through the same path as collectors/server.py (build_ssh_argv for remote hosts, local shell otherwise).
Choose systemctl is-active or the PowerShell Get-Service check from the target'sos_family (reuse ServerCollector.detect_os).
Tests: a remote host check uses SSH argv; a Windows target uses the PowerShell path; a local check still works.
Files
tools/fix_verifier.py, collectors/server.py, agent/core.py (where verify_fix is called), tests/test_fix_verifier.py
Activity