Hello all, I am starting to work with custodian fo...
# general
j
Hello all, I am starting to work with custodian for some use cases and I wonder I can I use the same "custodian run" command for running the policy for serveral subscriptions
a
The usual way is to use c7n-org for that - there's some info about that here: https://cloudcustodian.io/docs/azure/advanced/multiplesubs.html
j
Thanks. I was not aware of this tool.
Working really nice, thanks a lot.
🙌 1
I believed I faced with this error: custodian.azure.session:ERROR Failed to invoke the Azure CLI Strange runtime behavior when running c7n-org against multiple azure subscriptions · Issue #7041 · cloud-custodian/cloud-custodian is still ongoing?
a
Hmm good question, that issue wasn't on my radar. How many subscriptions are you targeting?
One thing that might be worth a shot is setting a custom value for the
C7N_ORG_PARALLEL
environment variable. If that's not defined, c7n-org will grab a cpu/core count and multiply it by 4 to determine how many parallel workers to run. It could be that if you've got enough cores and target subscriptions, it's hitting the Azure APIs too hard to get authenticated and running into rate limits
If you try with that environment variable set to 1, 5, 10, etc... and it works for lower values but dies at higher values that could be part of the problem. If you set it really low (say to 1) and it still dies then it probably means the problem is elsewhere.
j
hundreds of subscriptions...It seems to be better. I really appreciate