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

Reconsider systematic usage of update_cache in Ansible roles #433

Open
sbesson opened this issue Sep 6, 2024 · 0 comments
Open

Reconsider systematic usage of update_cache in Ansible roles #433

sbesson opened this issue Sep 6, 2024 · 0 comments

Comments

@sbesson
Copy link
Member

sbesson commented Sep 6, 2024

Noticed during the deployment of the software changes from #429 to prod122

As part of the migration of the OME Ansible roles to support RHEL9 started ~12 months ago, all usages of the built-in yum Ansible module have been replaced with the built-in dnf module. The update_cache parameter has been set to true across the board.

A consequence of this decision is a systematic and significant increase of the deployment time. As a minimum example, I executed the the idr-read-only.yml playbook against the test123 deployment in three consecutive runs.

With the current Ansible roles defined in ansible/requirements.yml, the playbook ran to completion in 6:02.90, 8:03.52 and 12:00.08.

I modified the Ansible roles downloaded locally via Galaxy to disable the cache update:

find vendor -type f -exec  sed -e "s/update_cache: true/update_cache: false/g" -i '' {} \;

With these changes, the playbook ran to completion in 2:35.17, 2:20.43 and 2:29.84 respectively.

As shown by the measurements above, the repeated calls to updating the cache for every DNF operation are causing a massive degradation in the execution times of our playbooks. While IDR has the most regular exposure due to the frequent deployments, this will affect anyone using the OME Ansible infrastructure on RHEL 9 including the UoD production deployments /cc @pwalczysko

Unless there is a rationale for keeping update_cache parameter and for make it configurable, my suggestion would be to remove it and release all the Ansible roles.

/cc @jburel @khaledk2

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

1 participant