rsync mirrors: use localauth vos release

We switched Fedora to do vos release via ssh with localauth in
I56ecdb2511597197deeeadf51f50da7e02f56954 and it has been working.

Switch the rest of the update scripts.  There is an increasing amount
of common code, start a common functions.sh script where we can put
this.

Change-Id: I4ba6d64a84bb66e8686901b16010352de942f303
This commit is contained in:
Ian Wienand 2019-11-26 07:22:46 +11:00 committed by Jens Harbott (frickler)
parent e474f5ce73
commit 98ab53ee42
7 changed files with 35 additions and 5 deletions

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then
@ -91,7 +93,7 @@ done
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
echo "rsync completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
$VOS_RELEASE $MIRROR_VOLUME
date --iso-8601=ns
echo "Done."

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then
@ -88,7 +90,7 @@ echo "$SHA1SUM $BASE/$REPO/$REPOMD" | sha1sum -c -
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
echo "rsync completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
$VOS_RELEASE $MIRROR_VOLUME
date --iso-8601=ns
echo "Done."

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1
function echo_ts {
@ -37,7 +39,6 @@ BASE="/afs/.openstack.org/mirror/fedora"
# https://pagure.io/releng/issue/7921
MIRROR="rsync://pubmirror2.math.uh.edu/fedora-buffet/fedora/linux"
K5START="k5start -t -f /etc/fedora.keytab service/fedora-mirror -- ${TIMEOUT}"
VOS_RELEASE="ssh -i /root/.ssh/id_vos_release vos_release@afs01.dfw.openstack.org vos release "
echo_ts "----- START FEDORA MIRROR RSYNC RUN -----"

View File

@ -0,0 +1,5 @@
#
# Common definitions and functions for mirror-update scripts
#
VOS_RELEASE="ssh -i /root/.ssh/id_vos_release vos_release@afs01.dfw.openstack.org vos release "

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then
@ -131,7 +133,7 @@ $K5START rsync -rlptDvz \
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
echo "rsync completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
$VOS_RELEASE $MIRROR_VOLUME
date --iso-8601=ns
echo "Done."

View File

@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
source /usr/share/mirror-update/functions.sh
MIRROR_VOLUME=$1
if [[ ${NO_TIMEOUT:-0} -eq 1 ]]; then
@ -58,7 +60,7 @@ $K5START rsync -rlptDvz \
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
echo "rsync completed successfully, running vos release."
k5start -t -f /etc/afsadmin.keytab service/afsadmin -- vos release -v $MIRROR_VOLUME
$VOS_RELEASE $MIRROR_VOLUME
date --iso-8601=ns
echo "Done."

View File

@ -8,6 +8,22 @@
group: root
mode: '0755'
- name: Create common function dir
file:
path: /usr/share/mirror-update
state: directory
owner: root
group: root
mode: '0755'
- name: Copy in common functions
copy:
src: 'functions.sh'
dest: '/usr/share/mirror-update'
owner: root
group: root
mode: '0644'
- name: Set update script names
set_fact:
rsync_update_scripts: