User Tools

Site Tools


Sidebar

General Lab Info (Mainly for Devs)

Hardware

Lab Infrastructure Services

Misc Admin Tasks
These are infrequently completed tasks that don't fit under any specific service

Production Services

OVH = OVH
RHEV = Sepia RHE instance
Baremetal = Host in Sepia lab

The Attic/Legacy Info

services:apt-mirror

apt-mirror

Summary

Serves as DEB and RPM repo mirrors. See apt-mirror's project page

Lives on gitbuilder-archive.

apt-mirror.sh

Called by root's crontab every day at 4PM Pacific time.

# cat /home/apt-mirror/apt-mirror.sh
#!/bin/bash
echo > /var/spool/apt-mirror/var/cron.log
for file in /etc/apt/mirrors/*.list
do
	cp -avf $file /etc/apt/mirror.list
	sleep 5
	/usr/bin/apt-mirror >> /var/spool/apt-mirror/var/cron.log
done

/bin/repomirror.sh

Called by root's crontab every day at 6PM Pacific time.

root@gitbuilder-archive:~# cat /bin/repomirror.sh | egrep -v "(^#.*|^$)"
tmp=/tmp/temprpm
rm -Rf $tmp 2> /dev/null
mkdir $tmp
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/sbin/chroot /images/rhel7 <<EOF
reposync -q -d -l --repoid=epel --download_path=/home/apt-mirror/mirror/epel7
createrepo /home/apt-mirror/mirror/epel7
EOF
rsync -av --delete-after /images/rhel7/home/apt-mirror/mirror/epel7/ /home/apt-mirror/mirror/epel7/
rsync -aHS --delete-after  --delay-updates rsync://mirrors.kernel.org/centos/ /home/apt-mirror/mirror/centos/

Common Problems

Hash checksum mismatch

This can happen when an upstream Ubuntu repo is modified while apt-mirror is running. Re-run apt-mirror.sh to resync the repos.

This can also happen when there is an inconsistency in the upstream repo. See http://tracker.ceph.com/issues/15459

Hacks

services/apt-mirror.txt · Last modified: 2022/06/28 14:25 by djgalloway