-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It's used in the initContainer but calls scripts that do not exist in this branch. (The el9 deployment was touching .ignore-errors to get this script to pass.) Until we delete the initContainers from the deployed repo instances, turn k8s_init.sh into a dummy script.
- Loading branch information
1 parent
9a7e541
commit af7fbd6
Showing
1 changed file
with
3 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,5 @@ | ||
#!/bin/bash | ||
|
||
REPO_BASEDIR="${REPO_BASEDIR:-/data}" | ||
REPO_MAXAGE="${REPO_MAXAGE:-480}" # default of 8 hours (8*60 min) | ||
REPO_TIMESTAMP="$REPO_BASEDIR/repo/osg/timestamp.txt" | ||
|
||
# Show errors, but allow a sleep for container debugging | ||
err_exit() { | ||
echo "Error on line $(caller)" >&2 | ||
sleep 5m | ||
if [ -f /.ignore-errors ] ; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
} | ||
trap 'err_exit' ERR | ||
|
||
# Was timestamp file modified less than $REPO_MAXAGE minutes ago? | ||
if test "$(find $REPO_TIMESTAMP -mmin -$REPO_MAXAGE)" ; then | ||
echo "Repo is current. Skipping sync." | ||
exit 0 | ||
fi | ||
|
||
# Generate output directories | ||
mkdir -p "$REPO_BASEDIR/mash" \ | ||
"$REPO_BASEDIR/mirror" \ | ||
"$REPO_BASEDIR/repo" \ | ||
"$REPO_BASEDIR/repo.previous" \ | ||
"$REPO_BASEDIR/repo.working" | ||
|
||
# Generate mash config files | ||
update_mashfiles.sh | ||
|
||
# Reorder mash tags for less lock contention | ||
rev /etc/osg-koji-tags/osg-tags | sort | rev > /tmp/osg-tags | ||
|
||
# Download repo data in parallel | ||
parallel --max-procs 12 --results /tmp/init --arg-file /tmp/osg-tags --retries 10 update_repo.sh {} | ||
|
||
# Add symlink for mirrorlist | ||
ln --no-target-directory --force --symbolic "$REPO_BASEDIR/mirror" "$REPO_BASEDIR/repo/mirror" | ||
|
||
# Generate mirrorlist | ||
update_mirror.py | ||
|
||
# Note: we can't run repo-update-cadist here, since it downloads *from* repo | ||
|
||
# Update tarballs | ||
update_tarball-install.sh | ||
|
||
# Create timestamp marker file | ||
echo $(date) > $REPO_TIMESTAMP | ||
# TODO: Delete this script once the initContainers have been removed from | ||
# all repo instances. | ||
exit 0 |