microsoft / ebpf-for-windows

eBPF implementation that runs on top of Windows
MIT License
2.92k stars 229 forks source link

Delete c:\eBPF folder on self-hosted runner VMs in post-cleanup, and uninstall Duonic. #2913

Closed rectified95 closed 1 year ago

rectified95 commented 1 year ago

Describe the bug

During regular operation leaving the test artifacts on the VM is fine - when a new job is scheduled the VMs are restored to the baseline checkpoint. However, when I worked on the VMs and updated the checkpoint, it included the c:\ebpf folder left over from a previous run, also Duonic services were running. Because of this, when a new job is scheduled on the 'restored' VM, during artifact copying the existing dswdevice.exe cannot be unlinked and replaced with the Duonic collateral and the job fails.

Solution - uninstall duonic and delete c:\ebpf directory in the post-cleanup step. That way, when maintenance is done on the VMs, the perosn won't need to remember to do it before updating the baseline checkpoint, and then spend time fixing it later.

rectified95 commented 1 year ago

We might not have a way to fully uninstall Duonic. especially on RS5 - it would require some changes in the OS tools (devcon, pnputil). We could add checkpoint restoration at the end of the driver job to work around this.