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

batch command support #1228

Closed
abbra opened this issue Apr 16, 2024 · 2 comments
Closed

batch command support #1228

abbra opened this issue Apr 16, 2024 · 2 comments

Comments

@abbra
Copy link
Collaborator

abbra commented Apr 16, 2024

While ansible-freeipa allows to have multiple IPA actions in the same block, they still submitted to IPA server separately. This causes a slowdown. Instead, a batch command from IPA API can be used to send all these commands in the same request and let IPA server to process the commands locally. This will cut down the time spent on communication.

A real life anecdotal data: deploying OpenStack infrastructure with ansible-freeipa took 4 hours, using IPA API with batch command directly completes the same action under 20 minutes.

The key culprit is the unrolling here: https://github.com/freeipa/ansible-freeipa/blob/master/plugins/module_utils/ansible_freeipa_module.py#L1403-L1426 where each IPA command is sent out separately. Instead, ansible-freeipa should repackage these commands into a list of dictionaries with the commands in them and then send that list as a single 'batch' command.

@abbra
Copy link
Collaborator Author

abbra commented Apr 16, 2024

Documentation for batch command: https://freeipa.readthedocs.io/en/latest/api/batch.html (not much, admittedly)
Basic usage guide: https://freeipa.readthedocs.io/en/latest/api/basic_usage.html#id9

@t-woerner
Copy link
Member

Fixed with #1229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants