Skip to content

feat(runners): add retry logic to default install and start script for dnf operations - #3787

Merged
npalm merged 3 commits into
github-aws-runners:mainfrom
jkruse14:feat/dnf-retry-logic
Mar 14, 2024
Merged

npalm merged 3 commits into
github-aws-runners:mainfrom
jkruse14:feat/dnf-retry-logic

Conversation

@jkruse14

Copy link
Copy Markdown
Contributor

Background


This is a continuation of work done in #3748

There seems to be a race condition some where with the user-data script and the EC2 starting up and locking RPM. This issue is seen elsewhere, not necessarily with this repo's user-data, see the following:

Amazon Linux 2023 - issue with installing packages with cloud-init

dnf/yum both fails while being executed on instance bootstrap on Amazon Linux 2023

Also, https://github.com/philips-labs/terraform-aws-github-runner/issues/3741

Changes Made


Added a loop to retry if the rpm lock file is found which sleeps for 5 seconds then retries again with a total of 5 iterations. This logic is now added to the user-data.sh for the upgrade-minimal operation and installation of docker, cloudwatch-agent, and curl.

Testing Done


In progress. I'd like to open this up to review while testing.

@jkruse14

Copy link
Copy Markdown
Contributor Author

@npalm another one for you. Same logic as the previous pr with retry logic

@jkruse14

jkruse14 commented Mar 5, 2024

Copy link
Copy Markdown
Contributor Author

@npalm @ScottGuymer - need some help here please

@npalm npalm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, need some time to test.

@npalm npalm changed the title feat: add retry logic for dnf operations feat(runners): add retry logic to default install and start script for dnf operations Mar 13, 2024
@npalm
npalm merged commit 6a8e1f0 into github-aws-runners:main Mar 14, 2024
npalm pushed a commit that referenced this pull request Mar 14, 2024
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

Successfully merging this pull request may close these issues.

2 participants