Skip to content

collect-wsl-logs.ps1 should warn users when a required tool is not installed #14427

@andremueiot

Description

@andremueiot

Is your feature request related to a problem? Please describe.
WSL developers need complete logs in order to investigate issues. Certain logs can only be collected when proper tools are installed on Linux.
It's common for people to miss these details when reading the documentation. Others don't read docs at all. This can result in incomplete logs and prevent issues from being root caused.

Describe the solution you'd like
It would be very useful for the script that collects the logs to check if the required tools are installed and write a clear warning in case some are missing, making it clear to the user that they should seriously consider installing the tool.

Describe alternatives you've considered
An alternative considered would be failing the script's execution when a tool is missing, but that is probably too drastic.
There might be a legitimate reason for the tool to not be installed, and blocking the collection of the other logs would arguably be worse.

Additional context
Suggested warnings:
WARNING: tcpdump not found on WSL. For a more complete log collection install tcpdump.
WARNING: iptables not found on WSL. For a more complete log collection install iptables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions