Skip to content

Fix km_ebpfcore_restart_test to run inside VM#5000

Open
Alan-Jowett wants to merge 1 commit intomicrosoft:mainfrom
Alan-Jowett:fix/km-ebpfcore-restart-test-vm-routing
Open

Fix km_ebpfcore_restart_test to run inside VM#5000
Alan-Jowett wants to merge 1 commit intomicrosoft:mainfrom
Alan-Jowett:fix/km-ebpfcore-restart-test-vm-routing

Conversation

@Alan-Jowett
Copy link
Member

Problem

The km_ebpfcore_restart_test has been failing every scheduled run since it was introduced (issue #4950). The previous RCA (Chocolatey missing) was fixed by PR #4968, but the test continues to fail with a new error:

Failed to create map, error: -1 Failed to open ebpfcore service, error: 1060 FAIL: ebpfcore service does not exist - environment issue!

Root Cause

The test command .\ebpf_restart_test_controller.exe was invoked directly on the 1ES runner host, but the eBPF components (ebpfcore service) are installed inside the Hyper-V VM (runner_vm) by setup_ebpf_cicd_tests.ps1. Error 1060 is ERROR_SERVICE_DOES_NOT_EXIST.

Other KM tests (e.g., km_mt_stress_tests_restart_extension) correctly route execution through execute_ebpf_cicd_tests.ps1, which uses Invoke-OnHostOrVM to run inside the VM.

Fix

Route the restart test through the existing VM execution infrastructure:

  1. cicd.yml - Changed test_command to use execute_ebpf_cicd_tests.ps1 with RestartEbpfCore option
  2. run_driver_tests.psm1 - Added RestartEbpfCore parameter to Invoke-CICDStressTests
  3. vm_run_tests.psm1 - Passes the new option through

Fixes #4950

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the km_ebpfcore_restart_test CI job by routing execution through the existing VM-based test execution path, ensuring the restart controller runs inside the Hyper-V VM where ebpfcore is installed.

Changes:

  • Update the km_ebpfcore_restart_test workflow command to call execute_ebpf_cicd_tests.ps1 with a new stress-test option (RestartEbpfCore).
  • Add a RestartEbpfCore switch to Invoke-CICDStressTests to run ebpf_restart_test_controller.exe via the standard VM test harness.
  • Plumb the new option through vm_run_tests.psm1 option parsing and into Invoke-CICDStressTests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/cicd.yml Runs the restart test through execute_ebpf_cicd_tests.ps1 so it executes inside the VM.
scripts/vm_run_tests.psm1 Recognizes RestartEbpfCore in -Options and forwards it to stress test invocation.
scripts/run_driver_tests.psm1 Implements RestartEbpfCore handling in Invoke-CICDStressTests to execute the restart controller.

@Alan-Jowett Alan-Jowett self-assigned this Feb 11, 2026
@Alan-Jowett Alan-Jowett added this to the 2602 milestone Feb 11, 2026
The restart test controller was invoked directly on the 1ES runner host,
but ebpfcore is installed inside the Hyper-V VM. This caused error 1060
(ERROR_SERVICE_DOES_NOT_EXIST) since the service doesn't exist on the host.

Route the test through execute_ebpf_cicd_tests.ps1 with a new
RestartEbpfCore stress test option, matching the pattern used by
km_mt_stress_tests_restart_extension.

Fixes microsoft#4950
@Alan-Jowett Alan-Jowett force-pushed the fix/km-ebpfcore-restart-test-vm-routing branch from c5538ff to dc92354 Compare February 13, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Workflow failed - km_ebpfcore_restart_test

1 participant