Mesa (master): ci: Set date in LAVA DUTs from NTP servers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 31 12:34:33 UTC 2020
Module: Mesa
Branch: master
Commit: cf8a8b764e53c3c81ca9ec6e799281b248954ffe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf8a8b764e53c3c81ca9ec6e799281b248954ffe
Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date: Fri Jul 31 06:51:47 2020 +0200
ci: Set date in LAVA DUTs from NTP servers
The MinIO server is sometimes complaining about the submitted date being
too off.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Daniel Stone <daniels at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6135>
---
.gitlab-ci.yml | 2 +-
.gitlab-ci/create-rootfs.sh | 1 +
.gitlab-ci/generate_lava.py | 4 ----
.gitlab-ci/lava-deqp.yml.jinja2 | 2 +-
.gitlab-ci/lava-gitlab-ci.yml | 2 +-
.gitlab-ci/lava-tracie.yml.jinja2 | 2 +-
6 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7f4e269742a..144b541bf6b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -355,7 +355,7 @@ arm64_test:
extends:
- .use-arm_test-base
variables:
- FDO_DISTRIBUTION_TAG: &arm64_test "2020-07-28-libdrm"
+ FDO_DISTRIBUTION_TAG: &arm64_test "2020-07-31-ntp"
.use-arm64_test:
variables:
diff --git a/.gitlab-ci/create-rootfs.sh b/.gitlab-ci/create-rootfs.sh
index 4f4609ed4c6..fdb1f587f36 100644
--- a/.gitlab-ci/create-rootfs.sh
+++ b/.gitlab-ci/create-rootfs.sh
@@ -41,6 +41,7 @@ apt-get -y install --no-install-recommends \
python3-pytest \
python3-requests \
python3-yaml \
+ sntp \
wget \
xz-utils
diff --git a/.gitlab-ci/generate_lava.py b/.gitlab-ci/generate_lava.py
index 6f887c5f90b..66b898841f4 100755
--- a/.gitlab-ci/generate_lava.py
+++ b/.gitlab-ci/generate_lava.py
@@ -43,10 +43,6 @@ values['tags'] = args.lava_tags
values['env_vars'] = env_vars
values['deqp_version'] = args.deqp_version
-# We need a sane date to check certificates, but don't want to wait to get
-# time from the network after boot.
-values['date'] = datetime.datetime.now().strftime("%Y%m%d %H%M")
-
f = open(os.path.splitext(os.path.basename(args.template))[0], "w")
f.write(template.render(values))
f.close()
diff --git a/.gitlab-ci/lava-deqp.yml.jinja2 b/.gitlab-ci/lava-deqp.yml.jinja2
index 639f1d1f40e..5ec39337b73 100644
--- a/.gitlab-ci/lava-deqp.yml.jinja2
+++ b/.gitlab-ci/lava-deqp.yml.jinja2
@@ -73,7 +73,7 @@ actions:
- mkdir -p /dev/pts
- mount -t devpts devpts /dev/pts
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
- - date "+%Y%m%d %H%M" -s "{{ date }}"
+ - for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done
{% if env_vars %}
diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml
index 7501d09233c..dd6b4810508 100644
--- a/.gitlab-ci/lava-gitlab-ci.yml
+++ b/.gitlab-ci/lava-gitlab-ci.yml
@@ -1,5 +1,5 @@
variables:
- DISTRIBUTION_TAG: "2020-07-28-x86"
+ DISTRIBUTION_TAG: "2020-07-31-ntp-2"
.kernel+rootfs:
stage: container-2
diff --git a/.gitlab-ci/lava-tracie.yml.jinja2 b/.gitlab-ci/lava-tracie.yml.jinja2
index 0811c6724fe..d0109bc2468 100644
--- a/.gitlab-ci/lava-tracie.yml.jinja2
+++ b/.gitlab-ci/lava-tracie.yml.jinja2
@@ -73,7 +73,7 @@ actions:
- mkdir -p /dev/pts
- mount -t devpts devpts /dev/pts
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
- - date "+%Y%m%d %H%M" -s "{{ date }}"
+ - for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done
{% if env_vars %}
More information about the mesa-commit
mailing list