Skip to content

Append failing eBPF dependency status to GPA service start failure error message#370

Merged
srikrishnaveturi merged 2 commits into
Azure:devfrom
srikrishnaveturi:ebpf-status-on-gpa-start-failure
Jul 7, 2026
Merged

Append failing eBPF dependency status to GPA service start failure error message#370
srikrishnaveturi merged 2 commits into
Azure:devfrom
srikrishnaveturi:ebpf-status-on-gpa-start-failure

Conversation

@srikrishnaveturi

@srikrishnaveturi srikrishnaveturi commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Overview

When GuestProxyAgent fails to start due to missing or unhealthy eBPF dependencies (SCM errors 1068 / 1075), the error log previously only contained the raw SCM error with no actionable context:

Service 'GuestProxyAgent' failed to start after 4 attempts

This change queries EbpfCore and NetEbpfExt immediately after a start failure and appends any non-Running services to the error message, so on-call responders can identify the root cause without manual investigation.

High Level Code Changes

proxy_agent_setup/src/main.rs

  • Added a failing_ebpf_deps_message pure helper function (Windows-only) that takes two ServiceStatusInfo values and returns None when both are healthy, or Some("Failing eBPF dependencies: ...") listing only the non-Running ones.
  • On start failure, the helper is called and its output appended inline to the single write_error call — no extra log lines when eBPF is healthy.
  • Added 5 unit tests covering all meaningful state combinations: both running (None), both missing, each individually missing or stopped.

Testing

Manually replaced proxy_agent_setup.exe in a VM, renamed the eBPF setup script to prevent auto-recovery, deleted both eBPF driver services, then ran proxy_agent_setup.exe install:

C:\Packages\Plugins\Microsoft.CPlat.ProxyAgent.ProxyAgentWindowsTest\1.0.41\ProxyAgent>sc delete EbpfCore
[SC] DeleteService SUCCESS

C:\Packages\Plugins\Microsoft.CPlat.ProxyAgent.ProxyAgentWindowsTest\1.0.41\ProxyAgent>sc delete NetEbpfExt
[SC] DeleteService SUCCESS

C:\Packages\Plugins\Microsoft.CPlat.ProxyAgent.ProxyAgentWindowsTest\1.0.41\ProxyAgent>proxy_agent_setup.exe install


============== ProxyAgent Setup Tool (9.9.9.0) is starting with args: install ==============
Stopped service GuestProxyAgent successfully
[... file copy output ...]
Install service GuestProxyAgent successfully
ebpf_setup: check_service_installed: service: eBPFSvc successfully queried.
Update service GuestProxyAgent with more service_dependency successfully
Service 'GuestProxyAgent' failed to start after 4 attempts
Service GuestProxyAgent start failed, error: WindowsService(Winapi(Os { code: 1068, kind: Uncategorized, message: "The dependency service or group failed to start." }), Os { code: 1068, kind: Uncategorized, message: "The dependency service or group failed to start." }). Failing eBPF dependencies: service: EbpfCore status query failed, service may not be installed; service: NetEbpfExt status query failed, service may not be installed

@srikrishnaveturi srikrishnaveturi force-pushed the ebpf-status-on-gpa-start-failure branch from f878d18 to 3c79e86 Compare July 6, 2026 22:24
ZhidongPeng
ZhidongPeng previously approved these changes Jul 6, 2026
@srikrishnaveturi srikrishnaveturi merged commit fc30fd1 into Azure:dev Jul 7, 2026
24 checks passed
@srikrishnaveturi srikrishnaveturi deleted the ebpf-status-on-gpa-start-failure branch July 7, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants