azure_preview_modules
azure_preview_modules copied to clipboard
azure_rm_keyvaultsecret takes like 4 minutes to insert one secret
Hi, Do you guys have the same behavior? When I create a secret via this module, it takes like 4 minutes to get inserted. I don't understand why? When i use my web browser for the same action (which is supposed to call the same API) it's almost immediate.
Ok, it's quick when I remove the MSI authentication part from the code..
The module tries to log with MSI even if the user set client_id and secret (for service principal based auth). Would it not be better to skip the MSI auth if those variables are set?
@MyronFanQiu Please take a look at this problem when you are free, thank you!
@MyronFanQiu
The module tries to log with MSI even if the user set client_id and secret (for service principal based auth). Would it not be better to skip the MSI auth if those variables are set?
If the variable is set, it should be ok to skip. As described in the document, use the msi will choose first subscription_id if there are multiple subscription_id. Thanks a lot!
@Sispheor Did the comments above address your doubts? Do you need any other help? Thanks a lot!
It seems that the module try in any case to log with MSI. If you look at this part of the code, there is no condition to skip this part.
@Sispheor Thanks for your info, we will look that it!
@zikalino Please take a look this issue when you're free! Thanks a lot!
Same issue with the lookup plugin https://github.com/Azure/azure_preview_modules/blob/master/lookup_plugins/azure_keyvault_secret.py#L101
@mybayern1974 Would you please take a look this issue? Thank you very much!
@mybayern1974 @haiyuazhang
@haiyuazhang Would you please help take a look this issue? Thank you very much!
Noticing the same issue, it tries to make a connection to the private IP even though I specified a service principal:
2020-03-03 14:36:12,798 urllib3.connectionpool Starting new HTTP connection (1): 169.254.169.254:80 2020-03-03 14:36:12,812 urllib3.connectionpool Starting new HTTP connection (1): 169.254.169.254:80
For now in the limit I added a timeout=10 to the MSI call so it doesn't take several minutes.
@Sispheor Thank you very much for your interest in Ansible. This repo is no longer maintained in this repository and has been migrated to https://github.com/ansible-collections/azure Please re-submit this Issue in the above repository and closed this. Thank you very much!