Merge pull request #13429 from Security-Onion-Solutions/jertel/retryreposync

retry up to 5 times if reposync fails
This commit is contained in:
Jason Ertel
2024-08-02 14:19:30 -04:00
committed by GitHub

View File

@@ -1814,7 +1814,7 @@ repo_sync_local() {
if [[ ! $is_airgap ]]; then if [[ ! $is_airgap ]]; then
curl --retry 5 --retry-delay 60 -A "netinstall/$SOVERSION/$OS/$(uname -r)/1" https://sigs.securityonion.net/checkup --output /tmp/install curl --retry 5 --retry-delay 60 -A "netinstall/$SOVERSION/$OS/$(uname -r)/1" https://sigs.securityonion.net/checkup --output /tmp/install
logCmd "dnf reposync --norepopath -g --delete -m -c /opt/so/conf/reposync/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" retry 5 60 "dnf reposync --norepopath -g --delete -m -c /opt/so/conf/reposync/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" || fail_setup
# After the download is complete run createrepo # After the download is complete run createrepo
create_repo create_repo
fi fi