diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml new file mode 100644 index 00000000..f4db61a6 --- /dev/null +++ b/.github/workflows/config.yml @@ -0,0 +1,169 @@ +wpa_profile: no-filter.wpaProfile + +logs_rules: + missing_logs_message: | + **No logs file found in this issue**. + + If this a feature request, please add the 'feature' tag. If this is a question, please add the `question` tag. + Otherwise please attach logs by following those instructions: + + Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: + + ``` + Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 + Set-ExecutionPolicy Bypass -Scope Process -Force + .\collect-wsl-logs.ps1 + ``` + + The scipt will output the path of the log file once done. + + Once completed please upload the output files to this Github issue. + + [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) + If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and add the `emailed-logs` tag to this issue. + + + Thank you! + + missing_logs_add_tags: ['needs-author-feedback'] + skip_tags: ['feature', 'question', 'emailed-logs', 'network'] + + +tags_rules: + - contains: '/question' + tag: 'question' + + - contains: '/feature' + tag: 'feature' + +rules: + - logline: + provider: Microsoft.Windows.Lxss.Manager + task: GuestLog + field1: + contains: 'brd: module loaded' + set: booting + + - logline: + provider: Microsoft.Windows.Lxss.Manager + task: GuestLog + field1: + contains: 'oom-kill' + set: + name: oom + capture: + field1: oom-error + + - logline: + provider: Microsoft.Windows.Lxss.Manager + task: GuestLog + field1: + contains: 'Kernel panic' + set: + name: kernel-panic + capture: + field1: kmsg + + - logline: + provider: Microsoft.Windows.Lxss.Manager + task: GuestLog + field1: + regex: 'WSL (.*) ERROR' + set: init-error + + - logline: + provider: Microsoft.Windows.Subsystem.Lxss + task: UserVisibleError + set: + name: user-visible-error + capture: + field3: error + + - logline: + provider: Microsoft-Windows-Hyper-V-Chipset + field1: + regex: '.*biosdevice.*80070057.*' # 80070057 = E_INVALIDARG + set: corrupted-initramfs + + - logline: + provider: Microsoft.Windows.Lxss.Manager + task: FailedToStartVm + set: + name: vm-failed-to-start + capture: + field4: error + + - logline: + provider: Microsoft.Windows.Lxss.Manager + set: service-running + oneshot: true + + - logline: + provider: Microsoft.Windows.Subsystem.Lxss + task: LxssException + field7: + regex: '.*0x80070422.*' + set: service-disabled-error + + - logline: + provider: Microsoft.Windows.Subsystem.Lxss + task: UserVisibleError + field3: {regex: '.*/ConfigureNetworking/HNS/.*'} + set: hns-fatal-error + + + - logline: + provider: Microsoft.Windows.Hyper.V.NetMgmt + task: NetMgmt::CreateVirtualSwitch + field4: '0x80041002' + set: + name: vmswitch-known-issue + capture: + field4: error + +actions: + - foreach: + var: user-visible-error + debug_message: 'Detected user visible error: $error' + + - when: + condition: 'kernel-panic' + debug_message: 'Found evidence of kernel panic: $kmsg' + + - when: + condition: + and: ['oom', 'booting'] + user_message: 'The logs show that WSL2 ran out of memory. Try increasing wsl2.memory in .wslconfig and see if that solves the issue.' + debug_message: 'Found evidence of OOM kill: $oom-error' + tag: needs-author-feedback + + - when: + condition: + and: ['vm-failed-to-start', 'hyperv-firmware-expired'] + user_message: 'The logs show that your Hyper-V firmware is expired. Please update your Windows build and see if that solves the issue' + tag: needs-author-feedback + + - when: + condition: + and: ['vm-failed-to-start', 'corrupted-initramfs'] + user_message: 'Your WSL installation seems corrupted. Please try to download and install the [latest WSL release](https://github.com/microsoft/WSL/releases/latest)' + tag: needs-author-feedback + + - when: + condition: + and: [{not: 'service-running'}, 'service-disabled-error'] + user_message: 'The logs show that wslservice is disabled. Try to run (elevated command prompt): `sc.exe config wslservice start= demand` and see if that solves the issue' + tag: needs-author-feedback + + - when: + condition: + and: ['vm-failed-to-start', 'hns-fatal-error'] + user_message: 'An HNS error seems to be causing WSL2 to fail to start. Adding network tag' + tag: 'network' + + - when: + condition: + and: ['vm-failed-to-start', 'vmswitch-known-issue'] + user_message: 'Known vmswitch issue found (error: $error). Adding network tag' + debug_message: 'Found evidence of vmswitch error: $error' + tag: 'network' \ No newline at end of file diff --git a/.github/workflows/no-filter.wpaProfile b/.github/workflows/no-filter.wpaProfile new file mode 100644 index 00000000..39a3135a --- /dev/null +++ b/.github/workflows/no-filter.wpaProfile @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.github/workflows/wti.exe b/.github/workflows/wti.exe new file mode 100644 index 00000000..0466c6ab Binary files /dev/null and b/.github/workflows/wti.exe differ diff --git a/.github/workflows/wti.yml b/.github/workflows/wti.yml new file mode 100644 index 00000000..99d4fbaa --- /dev/null +++ b/.github/workflows/wti.yml @@ -0,0 +1,46 @@ +name: Sync GitHub with ADO + +on: + pull_request: + +jobs: + wti: + name: Run wti + if: ${{ github.event.label.name == 'tracking' || contains(github.event.issue.labels.*.name, 'tracking') }} # Filters out issues/events without the 'tracking' label + runs-on: windows-2022 + steps: + - name: 'Run WTI' + run: cd \.github\workflows && wti.exe --issue 11306 --config config.yml --github-token "${{ secrets.GITHUB_TOKEN }}" --ignore-tags + network-sync: + name: GH-Sync networking issue + if: ${{ github.event.label.name == 'network' || contains(github.event.issue.labels.*.name, 'network') }} + runs-on: ubuntu-latest + steps: + - name: 'Trigger gh-sync' + uses: craigloewen-msft/gh-sync@main + with: + ado-organization-url: ${{ secrets.AZURE_DEVOPS_URL }} + ado-project: ${{ secrets.AZURE_DEVOPS_PROJECT }} + ado-area-path: ${{ secrets.AZURE_DEVOPS_NETWORKING_PATH }} + github-repo: 'microsoft/WSL' + issue-number: ${{github.event.issue.number}} # Auto-generated from GitHub action + ado-token: ${{ secrets.AZURE_DEVOPS_TOKEN }} # Your Personal Access Token (PAT) + github-token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated from GitHub action + + gpu-sync: + name: GH-Sync GPU issue + if: ${{ github.event.label.name == 'GPU' || contains(github.event.issue.labels.*.name, 'GPU') }} + runs-on: ubuntu-latest + steps: + - name: 'Trigger gh-sync' + uses: craigloewen-msft/gh-sync@main + with: + ado-organization-url: ${{ secrets.AZURE_DEVOPS_URL }} + ado-project: ${{ secrets.AZURE_DEVOPS_PROJECT }} + ado-area-path: ${{ secrets.AZURE_DEVOPS_GPU_PATH }} + github-repo: 'microsoft/WSL' + issue-number: ${{github.event.issue.number}} # Auto-generated from GitHub action + ado-token: ${{ secrets.AZURE_DEVOPS_TOKEN }} # Your Personal Access Token (PAT) + github-token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated from GitHub action + ado-assigned-to: ${{ secrets.AZURE_DEVOPS_GPU_ASSIGNED_TO }} +