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

Chrome Remote Desktop: increase resilience of apt operations #3093

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

tpdownes
Copy link
Member

@tpdownes tpdownes commented Oct 2, 2024

We have observed failures of this module when unattended-upgrades is running simultaneously to the installation of xfce4. There is no solution to this other than to wait. This increases the retry duration from 1 minute to 5 minutes and the number of retries from 6 to 10 (a total of 11 attempts). When we adopt ansible-core 2.12 or later, we should use the lock_timeout feature more directly:

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html#parameter-lock_timeout

Additionally, this changes the behavior of the CRD Ansible playbook to update the apt cache only if it is stale (more than 1 hour old). In practice, the apt cache is unlikely to be stale in this playbook because Ansible was just installed by pip, which requires several packages to be installed. Thus forcing the cache update is both wasteful in time and increases the chance of an error.

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

Update the behavior of Ansible to update the apt cache only if it is
stale (more than 1 hour old). In practice, the apt cache is unlikely to
be stale because Ansible was just installed by pip, which requires
several packages to be installed.
We have observed failures of this module when unattended-upgrades is
running simultaneously to the installation of xfce4. This increases the
retry duration from 1 minute to 5 minutes and the number of retries from
6 to 10 (a total of 11 attempts).

When we adopt ansible-core 2.12 or later, we should use the lock_timeout
feature more directly:

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html#parameter-lock_timeout
@tpdownes tpdownes requested a review from nick-stroud October 2, 2024 14:39
@tpdownes tpdownes added the release-bugfix Added to release notes under the "Bug fixes" heading. label Oct 2, 2024
@tpdownes tpdownes mentioned this pull request Oct 2, 2024
@nick-stroud nick-stroud assigned tpdownes and unassigned nick-stroud Oct 8, 2024
@tpdownes tpdownes merged commit 5826554 into GoogleCloudPlatform:develop Oct 8, 2024
12 of 57 checks passed
@tpdownes tpdownes deleted the increase_crd_retry branch October 8, 2024 15:30
@harshthakkar01 harshthakkar01 mentioned this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-bugfix Added to release notes under the "Bug fixes" heading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants