[PATCH 2/2] s3-mirror: delay the `sync --delete` a bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So the running DNF processes can finish transaction.
---
 roles/s3-mirror/files/s3.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/roles/s3-mirror/files/s3.sh b/roles/s3-mirror/files/s3.sh
index 4b300e370..70046d21f 100644
--- a/roles/s3-mirror/files/s3.sh
+++ b/roles/s3-mirror/files/s3.sh
@@ -119,7 +119,6 @@ done
 for file in $(echo /srv/pub/epel/8/*/repodata/repomd.xml | sed 's#/srv##g'); do
   aws cloudfront create-invalidation --distribution-id "$DIST_ID" --paths "$file"
 done
-"${CMD3[@]}" /srv/pub/epel/ "s3://$S3_MIRROR/pub/epel/"
 
 # Sync Fedora
 #echo $CMD /srv/pub/fedora/ s3://$S3_MIRROR/pub/fedora/
@@ -131,4 +130,11 @@ echo "Ending Fedora sync at $(date)" >> /var/log/s3-mirror/timestamps
 for file in $(echo /srv/pub/fedora/linux/updates/*/*/*/repodata/repomd.xml | sed 's#/srv##g'); do
   aws cloudfront create-invalidation --distribution-id "$DIST_ID" --paths "$file"
 done
+
+# Consider some DNF processes started downloading metadata before we invalidated
+# caches, and started with outdated repomd.xml file.  Give it 10 minutes so they
+# have chance to download the rest of metadata and RPMs.
+sleep 600
+
+"${CMD3[@]}" /srv/pub/epel/ "s3://$S3_MIRROR/pub/epel/"
 "${CMD3[@]}" /srv/pub/fedora/ s3://$S3_MIRROR/pub/fedora/
-- 
2.25.1
_______________________________________________
infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux