fix: health history all-down — connectivity checks and UI data path
Service manager fixes (connectivity tests): - email_manager: replace telnet with socket.create_connection for SMTP/IMAP; replace nslookup with socket.getaddrinfo for DNS; exclude unconfigured domain from success (email healthy=False now correctly means ports refused, not missing domain) - calendar_manager: replace localhost:5232 with cell-radicale:5232; fix database check to test dir writability instead of file existence (files created on demand) - file_manager: replace localhost:8080 with cell-webdav:80; add top-level success key - network_manager: replace nslookup with socket.getaddrinfo; add success key to dhcp_test and ntp_test return values - routing_manager: exclude iptables_access from success (iptables runs in cell-wireguard, not API container) - wireguard_manager: add success key to no-arg test_connectivity result Health history UI: - SvcCol reads data?.status?.running || data?.status?.status — handles nested health check shape Result: network/wireguard/calendar/files/routing/vault all healthy=True. Email healthy=False is correct — mail server needs ≥1 account before Dovecot starts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -515,7 +515,8 @@ class WireGuardManager(BaseServiceManager):
|
||||
"""Ping a peer IP and return results. Called with no args from health_check."""
|
||||
if not peer_ip:
|
||||
status = self.get_status()
|
||||
return {'reachable': status.get('running', False), 'status': status.get('status')}
|
||||
running = status.get('running', False)
|
||||
return {'success': running, 'reachable': running, 'status': status.get('status')}
|
||||
try:
|
||||
result = subprocess.run(
|
||||
['ping', '-c', '1', '-W', '2', peer_ip],
|
||||
|
||||
Reference in New Issue
Block a user