From 45bb43590e77cf66659c2e1892f4dbfc2535c216 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Sun, 8 Oct 2017 12:56:09 +0200 Subject: [PATCH] mm-propagation: use pdc instead of pkgdb for active releases The propagation scripts were still using pkgdb to get a list of active releases. This switches the scripts to use pdc instead of pkgdb. One difference between pdc and pkgdb is that pkgdb did not mark a release as active until the actual release day. In pdc the release (in this case f27) is already marked as active and it is not clear how to filter it out until the official release. As the propagation scripts are looking at the updates-released repository it will not provide useful data for f27 until content is pushed to the updates-released repository. Signed-off-by: Adrian Reber --- roles/mirrormanager/backend/templates/handle_propagation.sh | 4 ++-- roles/mirrormanager/crawler/files/check_propagation.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/mirrormanager/backend/templates/handle_propagation.sh b/roles/mirrormanager/backend/templates/handle_propagation.sh index d0c72967d1..11e19cf7bf 100644 --- a/roles/mirrormanager/backend/templates/handle_propagation.sh +++ b/roles/mirrormanager/backend/templates/handle_propagation.sh @@ -1,6 +1,6 @@ #!/bin/sh -URL="https://admin.fedoraproject.org/pkgdb/api/collections/f*/?clt_status=Active" +URL="https://pdc.fedoraproject.org/rest_api/v1/releases/?active=True&name=Fedora" PROPAGATION="/usr/bin/mm2_propagation" SOURCE="mm-crawler01.phx2.fedoraproject.org::propagation" LOGBASE="/var/log/mirrormanager/propagation" @@ -21,7 +21,7 @@ if [ $? -ne 0 ]; then exit 1 fi -for version in `jq -r ".collections[$i].version" < ${ACTIVE}`; do +for version in `jq -r ".results[$i].version" < ${ACTIVE} | grep -v Rawhide`; do ${PROPAGATION} --outdir ${OUTPUT} --logfiles "${LOGBASE}/f${version}*" --prefix f${version}_updates done diff --git a/roles/mirrormanager/crawler/files/check_propagation.sh b/roles/mirrormanager/crawler/files/check_propagation.sh index 5bc0a136b3..fff33c039a 100755 --- a/roles/mirrormanager/crawler/files/check_propagation.sh +++ b/roles/mirrormanager/crawler/files/check_propagation.sh @@ -1,6 +1,6 @@ #!/bin/sh -URL="https://admin.fedoraproject.org/pkgdb/api/collections/f*/?clt_status=Active" +URL="https://pdc.fedoraproject.org/rest_api/v1/releases/?active=True&name=Fedora" CRAWLER="/usr/bin/mm2_crawler" LOGBASE="/var/log/mirrormanager/propagation" @@ -17,7 +17,7 @@ if [ $? -ne 0 ]; then fi # check propagation for the active branches -for version in `jq -r ".collections[$i].version" < ${ACTIVE}`; do +for version in `jq -r ".results[$i].version" < ${ACTIVE} | grep -v Rawhide`; do ${CRAWLER} --propagation --proppath updates/${version}/x86_64/repodata --threads 50 2>&1 | grep SHA256 > ${LOGBASE}/f${version}_updates-propagation.log.$( date +%s ) done