Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamic VM fetch failure when I(batch_fetch=true) #1344

Merged

Conversation

Fred-sun
Copy link
Collaborator

SUMMARY

Fix dynamic VM fetch failure when I(batch_fetch=true), fixes #1328

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

azure_rm.py

ADDITIONAL INFORMATION

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged medium_priority Medium priority labels Nov 23, 2023
@xuzhang3 xuzhang3 merged commit 5dec17d into ansible-collections:dev Dec 6, 2023
@TiTi
Copy link
Contributor

TiTi commented Apr 5, 2024

Damn this is still not in https://pypi.org/project/ansible/#files (currently 9.4.0)

@Fred-sun Fred-sun deleted the fix-inventory-fetch-batch-fail branch April 7, 2024 00:40
@Fred-sun
Copy link
Collaborator Author

Fred-sun commented Apr 7, 2024

@TiTi What version of aze.azcollection did you install, and the new changes are released in the version that incorporates this PR. Thank you!

@TiTi
Copy link
Contributor

TiTi commented Apr 7, 2024

I had an azure inventory failure for a very specific resource group (using include_vm_resource_groups).
Other resource group in the same subscription was ok (loading fine), but this resource group had more resources (50+ vms) and was unable to list the vms, with a weird json error in -vvvv, which led me to this fix after troubleshooting manually with batch_fetch and az rest.

I had the azure.azcollection which is included in the "ansible" latest pip package (currently 9.4.0).
@Fred-sun Currently, the ansible 9.4.0 package includes azure.azcollection v1.19.0

Manually installing latest azure.azcollection (2.3.0) [with ansible-galaxy collection install azure.azcollection] + requirements (cf docs) added this fix and thus resolved my issue : inventory loaded properly with default batch_fetch=true

I'm surprised this fix from end of november hasn't got to latest "ansible" pip package that's all.

@Fred-sun
Copy link
Collaborator Author

Fred-sun commented Apr 8, 2024

@TiTi azure.azcollection is a part of ansible collection, which is managed through ansible-galaxy. You can only install ansible with pip and then install azure.azcollection with ansible tool ansible-galaxy. Thank you!

@TiTi
Copy link
Contributor

TiTi commented Apr 8, 2024

That's incorrect @Fred-sun
Once you install ansible with pip, you get a lot of collections included.
See my link before and this capture :
image

This actually represents the biggest part of the tarball file.

One can also think those are 'compatible' collections with selected ansible version.

ansible-galaxy is certainly the way to go. But then, why (outdated) collections are pre-installed in the 'ansible' pip module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azure_rm inventory batch_fetch not working in v1.19.0
3 participants