[Network] Show-status for a running packet capture produces no output
As reported in an email thread:
Actually I just found the same issue is reproducible in Azure CLI 2.0 – empty object is returned if Packet Capture is running – please see below results when packet capture is running and after it is stopped on the portal. However, if packet capture is stopped, status is deserialized correctly.
Steps the repro:
- start a packet capture session
- show-status while capture is running => NO OUTPUT
- stop packet capture
- show-status while capture is stopped => correct output
This is suspected to be a service issue or swagger bug (which is a service issue still I suppose).
We can evaluate whether there is a reasonable temporary workaround for the CLI.
there is no bug in swagger. I checked both cli and powershell to see packet capture status when it's running. All works fine.
PS C:\Users\irrogozh> az network watcher packet-capture show-status --location westcentralus --name cliTest --subscription 61cc8a98-a8be-4bfe-a04e-0b461f93fe35 { "captureStartTime": "2019-10-11T23:51:28.159908+00:00", "id": "/subscriptions/61cc8a98-a8be-4bfe-a04e-0b461f93fe35/resourceGroups/NetworkWatcherRG/providers/Microsoft.Network/networkWatchers/NetworkWatcher_westcentralus/packetCaptures/cliTest", "name": "cliTest", "packetCaptureError": [], "packetCaptureStatus": "Running", "resourceGroup": "NetworkWatcherRG", "stopReason": null }
I think we could close the issue.