azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Excessive Logging from New-AzureRmResourceGroupDeployment

Open bganapa opened this issue 9 years ago • 8 comments

New-AzureRmResourceGroupDeployment constantly spews: Checking deployment status in 5 seconds

In azurestack BVTs, there are many template deployments, typically running up to an hour.

this creates a large amount of command line spew and makes it hard to find the useful output from the cmdlet.

bganapa avatar Sep 19 '17 07:09 bganapa

@ravbhatnagar , Can we remove this excessive logging for every 5 seconds and do some kind of backoff logging? or do this only when verbose preference is set?

bganapa avatar Jan 02 '18 20:01 bganapa

@ravbhatnagar ping

cormacpayne avatar Jul 06 '18 20:07 cormacpayne

This is a request for not just Azure Stack.

deathly809 avatar Aug 06 '18 22:08 deathly809

This is not specific to Azure Stack.

knithinc avatar Dec 03 '18 23:12 knithinc

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.

ghost avatar Mar 27 '20 21:03 ghost

This is a good suggestion, but this is not something we are likely to get to soon. This might be a good item for external contribution.

alex-frankel avatar Jun 05 '20 17:06 alex-frankel

:bell: Routing this issue to @act-identity-squad.

Thanks for your patience here — apologies for the very long wait. This was recently picked up as an outstanding open issue for the ARM Deployments team to review, and the good news is it looks resolved.

Picking up @bganapa's original 2018 suggestion (gate it behind verbose and/or add backoff) and @alex-frankel's 2020 note that it'd be a good contribution — both of those landed. In current Az.Resources the polling line is emitted via WriteVerbose, and the poll interval now backs off rather than firing every 5 seconds:

// ResourceClient.cs (WaitDeploymentStatus)
WriteVerbose(string.Format("Checking deployment status in {0} seconds.", counter / 1000));
...
counter = counter + 5000 > 60000 ? 60000 : counter + 5000;   // 5s, 10s, 15s ... capped at 60s

I verified this at runtime on Az.Resources 9.0.3:

  • running New-AzResourceGroupDeployment without -Verbose → the "Checking deployment status…" line doesn't appear in any stream, so there's no more spew in normal output; and
  • running with -Verbose → it shows up only on the verbose stream, and the interval grows over time.

So both the noise (now verbose-only) and the cadence (now backing off to a 60s cap) are addressed. I'll close this as resolved.

If you'd like could you confirm it looks right on a current module in your Azure Stack BVT runs? Happy to reopen if you still see excessive output without -Verbose.

torreymicrosoft avatar Jun 08 '26 22:06 torreymicrosoft