Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debugging output for Azure SSH provider #145

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

p0-andrewa
Copy link
Contributor

This PR improves the Azure SSH debugging experience by adding debug output for the various az commands being run before opening the ssh/scp session. Specifically, when the --debug flag is set, the CLI will output the stdout and stderr for all the az commands it runs. Note though that it won't set the --debug flag for the az commands themselves as this outputs far too much information, with the exception of the az network bastion tunnel command; while it still outputs far too much information in debug mode, it has an unfortunate tendency to hide certain errors unless you pass it the --debug flag, so I did add it there.

Some additional information is also logged by the CLI itself now when the --debug flag is set.

Testing

Tested locally against my Azure VM in our test tenant, both with and without the --debug flag.

Screenshots

Example output when not using --debug; matches output from before this PR (as before, sensitive redaction value by my terminal, not the CLI):
Output without debug

Examples of output when using --debug:
Initial startup:
Output with debug 1

Generating Azure AD SSH certificate:
Output with debug 2

Starting tunnel (and showing repro commands added in previous PR):
Output with debug 3

Closing SSH session and shutting down tunnel:
Output with debug 4

@p0-andrewa p0-andrewa force-pushed the andrewadams/eng-3131-add-azure-ssh-repro-commands branch from 6d61bd5 to 287a0d3 Compare November 23, 2024 00:31
Base automatically changed from andrewadams/eng-3131-add-azure-ssh-repro-commands to main November 23, 2024 00:35
Adds debugging output for the various Azure CLI (`az`) commands invoked
as part of the Azure SSH provider. Also includes a (filtered) debugging
output from the Azure Network Bastion tunnel process to aid with
debugging that part of the provider.
@p0-andrewa p0-andrewa force-pushed the andrewadams/eng-3131-azure-ssh-debug-output branch from 2dd6b80 to ecf1b40 Compare November 23, 2024 00:40
@p0-andrewa
Copy link
Contributor Author

Simple rebase on main; will merge when checks are done running.

@p0-andrewa p0-andrewa merged commit a4197ed into main Nov 23, 2024
3 checks passed
@p0-andrewa p0-andrewa deleted the andrewadams/eng-3131-azure-ssh-debug-output branch November 23, 2024 00:42
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