[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible: use time.osuosl.org as ntp server for OSUOSL nodes, de.pool.ntp.org for the rest
Holger Levsen
gitlab at salsa.debian.org
Tue Jan 15 13:39:41 GMT 2019
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
060817f9 by Holger Levsen at 2019-01-15T13:39:31Z
reproducible: use time.osuosl.org as ntp server for OSUOSL nodes, de.pool.ntp.org for the rest
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
3 changed files:
- deploy_jdn
- hosts/common/etc/rc.local
- update_jdn.sh
Changes:
=====================================
deploy_jdn
=====================================
@@ -218,7 +218,11 @@ for i in "${HOSTS[@]}" ; do
if $reset_clock ; then
if node_in_the_future "$i" ; then
# set correct future date
- remote_command="sudo ntpdate -b de.pool.ntp.org && $remote_command && sudo date --set=\"+398 days +6 hours + 23 minutes\" && echo '__$(echo $i|cut -d '.' -f1)=ok__'"
+ case "$i" in
+ osuosl-build*) NTP_SERVER=de.pool.ntp.org ;;
+ *) NTP_SERVER=time.osuosl.org ;;
+ esac
+ remote_command="sudo ntpdate -b $NTP_SERVER && $remote_command && sudo date --set=\"+398 days +6 hours + 23 minutes\" && echo '__$(echo $i|cut -d '.' -f1)=ok__'"
fi
fi
get_arch_color $i
=====================================
hosts/common/etc/rc.local
=====================================
@@ -19,7 +19,11 @@ send_back_to_the_future() {
systemctl stop systemd-timedated || true
systemctl stop ntp.service || true
# set correct date
- ntpdate -b de.pool.ntp.org
+ if [ -z "$1" ] ; then
+ ntpdate -b de.pool.ntp.org
+ else
+ ntpdate -b $1
+ fi
# set fake date
date --set="+398 days +6 hours + 23 minutes"
# finally report success
@@ -104,7 +108,7 @@ case $(hostname) in
profitbricks-build6*) send_back_to_the_future ;;
profitbricks-build15*) send_back_to_the_future ;;
profitbricks-build16*) send_back_to_the_future ;;
- osuosl-build170*) send_back_to_the_future ;;
+ osuosl-build170*) send_back_to_the_future time.osuosl.org;;
*) ;;
esac
=====================================
update_jdn.sh
=====================================
@@ -47,7 +47,7 @@ explain() {
set_correct_date() {
# set correct date
sudo service ntp stop || true
- sudo ntpdate -b de.pool.ntp.org
+ sudo ntpdate -b $1
}
disable_dsa_check_packages() {
@@ -72,15 +72,15 @@ fi
case $HOSTNAME in
profitbricks-build4-amd64|profitbricks-build5-amd64|profitbricks-build6-i386|profitbricks-build15-amd64|profitbricks-build16-i386)
# set correct date
- set_correct_date
+ set_correct_date de.pool.ntp.org
;;
codethink-sled9*|codethink-sled11*|codethink-sled13*|codethink-sled15*)
# set correct date
- set_correct_date
+ set_correct_date de.pool.ntp.org
;;
osuosl-build170-amd64)
# set correct date
- set_correct_date
+ set_correct_date time.osuosl.org
;;
*) ;;
esac
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/060817f92c646c3972f504776134211e400c0d11
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/060817f92c646c3972f504776134211e400c0d11
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190115/5e3a1bbf/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list