Open Bowbaq opened 4 years ago
add to S168
According to the error reported by Azure CLI:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/bowbaq/.azure/telemetry/cache' -> '/Users/bowbaq/.azure/telemetry/cache.1'
I suspect this is caused by a racing case during parallel execution when .azure/telemetry/cache
is not locked. Please check if #1347, #9427 can solve the issue.
We are planning to use portalocker to mitigate such scenarios. +@fengzhou-msft @haroldrandom
I've certainly run into #9427 several times.
I'm not really sure how file locking is going to help here. It seems to be it's more of a design issue. Separate processes shouldn't really be logging to the same file, they should probably each have their own (name after the PID or something like that).
As for the access tokens, it appears to be essentially the same problem of several processes clobbering the file by updating it concurrently. This can be mitigated by storing each access token in its own file (maybe named after the expiration timestamp?). Newly started processes can read all existing tokens in the folder. Any new token goes into its own file. Expired tokens can be garbage collected periodically.
Azure CLI does have an option to disable telemetry. Please see CLI configuration values and environment variables and use collect_telemetry
to disable telemetry.
For concurrent build, please see https://github.com/Azure/azure-cli/blob/dev/doc/use_cli_effectively.md#concurrent-builds
FWIW - I just ran into the telemetry cache issue when trying to run az cli with gnu parallel to do some concurrent work. Disabling telemetry seems to have resolved it. Any updates on this issue?
We currently doesn't have enough bandwidth implementing parallel/concurrent execution. Please see Concurrent builds if you want to run Azure CLI instances concurrently.
Describe the bug
Command Name
terraform apply
,terraform plan
orterraform refresh
using AZ CLI credential providerErrors:
To Reproduce:
I unfortunately don't have good reproduction steps. This seemingly happens randomly when using
terraform apply
,terraform plan
orterraform refresh
. The error usually goes away when re-running the same command, but not always, it can take a few retries.We have the following configuration for the
azurerm
provider:Expected Behavior
I would expect
az
not to crash during normal operationsEnvironment Summary