Update paths for AFS mirror
In the current setup, the reprepro db and lists dirs are being written into /root. Move them into AFS so that we store all the data in the same place. Also, update the script to point to the confdir for reprepro commands. Note: This will require a manual move of the current db and lists dirs from /root to /afs/.openstack.org/mirror/apt before this is run. Change-Id: I2638621e6af98296704e680227fae174d8a0e541
This commit is contained in:
parent
a751c6c2b8
commit
d00e7c0e5d
@ -17,21 +17,22 @@
|
||||
set -e
|
||||
|
||||
UNREF_FILE=/var/run/reprepro/unreferenced-files
|
||||
REPREPRO='reprepro --confdir /etc/reprepro'
|
||||
|
||||
echo "Obtaining reprepro tokens and running reprepro update"
|
||||
k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m reprepro update
|
||||
k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m $REPREPRO update
|
||||
|
||||
if [ -f $UNREF_FILE ] ; then
|
||||
echo "Cleaning up files made unreferenced on the last run"
|
||||
k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m reprepro deleteifunreferenced < $UNREF_FILE
|
||||
k5start -t -f /etc/reprepro.keytab service/reprepro -- timeout -k 2m 30m $REPREPRO deleteifunreferenced < $UNREF_FILE
|
||||
fi
|
||||
|
||||
echo "Saving list of newly unreferenced files for next time"
|
||||
reprepro dumpunreferenced > $UNREF_FILE
|
||||
$REPREPRO dumpunreferenced > $UNREF_FILE
|
||||
|
||||
echo "Checking state of mirror"
|
||||
reprepro checkpool fast
|
||||
reprepro check
|
||||
$REPREPRO checkpool fast
|
||||
$REPREPRO check
|
||||
|
||||
echo "reprepro completed successfully, running reprepro export."
|
||||
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v mirror.apt
|
||||
|
@ -1,7 +1,7 @@
|
||||
# == Class: openstack_project::mirror_update
|
||||
#
|
||||
class openstack_project::reprepro (
|
||||
$outdir = '/afs/.openstack.org/mirror/apt',
|
||||
$basedir = '/afs/.openstack.org/mirror/apt',
|
||||
$logdir = '/var/log/reprepro',
|
||||
$updates_file = 'puppet:///modules/openstack_project/reprepro/updates',
|
||||
$options_template = 'openstack_project/reprepro/options.erb',
|
||||
|
@ -1,4 +1,4 @@
|
||||
outdir <%= @outdir %>
|
||||
basedir <%= @basedir %>
|
||||
keepunreferencedfiles
|
||||
noskipold
|
||||
export changed
|
||||
|
Loading…
x
Reference in New Issue
Block a user