Skip to content

feat: add retry logic to libicu download - #3748

Merged
npalm merged 5 commits into
github-aws-runners:mainfrom
jkruse14:feat/libicu-retry
Feb 12, 2024
Merged

npalm merged 5 commits into
github-aws-runners:mainfrom
jkruse14:feat/libicu-retry

Conversation

@jkruse14

@jkruse14 jkruse14 commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

Background


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, #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.

Testing


Spun up an instance and ran the script directly (using sudo the second time because this was not run via user-data)
image

@jkruse14

jkruse14 commented Feb 8, 2024

Copy link
Copy Markdown
Contributor Author

@npalm - any chance we could get eyes on this?

@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.

Thanks, looks good. Need to test asap

@jkruse14

Copy link
Copy Markdown
Contributor Author

Thanks, looks good. Need to test asap

@npalm - Anything you need from me for testing?

@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, a small suggestion

@jkruse14
jkruse14 requested a review from npalm February 12, 2024 15:15
@npalm
npalm merged commit 1b4597b into github-aws-runners:main Feb 12, 2024
@jkruse14
jkruse14 deleted the feat/libicu-retry branch February 12, 2024 17:16
npalm added a commit that referenced this pull request Mar 14, 2024
…r dnf operations (#3787)

## 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](https://repost.aws/questions/QU_tj7NQl6ReKoG53zzEqYOw/amazon-linux-2023-issue-with-installing-packages-with-cloud-init)

[dnf/yum both fails while being executed on instance bootstrap on Amazon
Linux
2023](https://repost.aws/questions/QUgNz4VGCFSC2TYekM-6GiDQ/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.

Co-authored-by: Niek Palm <[email protected]>
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