-
Notifications
You must be signed in to change notification settings - Fork 193
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
(MODULES-10909) Commands retry on network connectivity failures #536
(MODULES-10909) Commands retry on network connectivity failures #536
Conversation
The ticket specifically calls out Windows hiccups, but this doesn't seem to modify the PowerShell task as well? It seems like it'd be useful, for us and users, to add it there too. |
Added a commit with some changes after discussing with @adrianiurca. Manually tested all the changes using Bolt on Microsoft Windows 2019, SLES 11, SLES 15 and Ubuntu 18.04 and seems to be working as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests:
- Accepts retry of 0 and does not retry
- Accepts negative number and does not retry
- Retries when running the PowerShell task
- Retries when running the nix task
Before this commit, the install tasks (`install_shell.sh` and `install_powershell.ps1`) exited at the first network connectivity failure. This change adds a retry mechanism to the `wget`, `curl`, `fetch`, `perl`, `yum`, `zypper`, `apt-get` (Linux) and `System.Net.Webclient.DownloadFile` (Windows) commands which waits one second between attempts. The number of attempts is `5` by default but can be configured via the new retry setting.
Squashed the commits and updated the commit message/description. |
Before this commit, the install tasks (
install_shell.sh
andinstall_powershell.ps1
) exited at the first network connectivity failure. This change adds a retry mechanism to thewget
,curl
,fetch
,perl
,yum
,zypper
,apt-get
(Linux) andSystem.Net.Webclient.DownloadFile
(Windows) commands which waits one second between attempts. The number of attempts is5
by default but can be configured via the newretry
setting.