osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/37474?usp=email )
Change subject: CI: OBS: centos7: use vault.centos.org
......................................................................
CI: OBS: centos7: use vault.centos.org
The centos7 images try to use mirrorlist.centos.org to determine the
fastest mirror, and then download binary packages from there. But
mirrorlist.centos.org isn't online anymore. Use the vault instead.
Without this patch, the mirrors that can't be reached are ignored, and
later on it fails to properly install packages because of missing
dependencies.
Related: docker-playground I0a8f93bb16dd9245760b8a1ad53f0642d446b4cf
Change-Id: I2489fe1d6edf969e55e154bca4b6d961da2a9d94
---
M scripts/obs/data/build_binpkg.Dockerfile
1 file changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/74/37474/1
diff --git a/scripts/obs/data/build_binpkg.Dockerfile b/scripts/obs/data/build_binpkg.Dockerfile
index b29d8f9..66f1feb 100644
--- a/scripts/obs/data/build_binpkg.Dockerfile
+++ b/scripts/obs/data/build_binpkg.Dockerfile
@@ -52,6 +52,11 @@
su user -c rpmdev-setuptree \
;; \
centos:7) \
+ set -x && \
+ sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo && \
+ \
yum -y install \
autoconf \
automake \
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37474?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I2489fe1d6edf969e55e154bca4b6d961da2a9d94
Gerrit-Change-Number: 37474
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37471?usp=email )
Change subject: asterisk: Wait for Asterisk ready before starting testsuite
......................................................................
asterisk: Wait for Asterisk ready before starting testsuite
A recent commit made Asterisk wait for dnsmasq to be ready before
starting it. This means Asterisk takes more time now to be ready itself,
hence we need to delay launching the testsuite until it is ready.
Otherwise, the entire set of tests may be run even before Asterisk gets
to answer on the AMI socket.
Change-Id: I337d57f3eb3e6688dbf3c61d55978da10d84b2cb
---
M ttcn3-asterisk-ims-ue-test/jenkins.sh
M ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh
2 files changed, 28 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/ttcn3-asterisk-ims-ue-test/jenkins.sh b/ttcn3-asterisk-ims-ue-test/jenkins.sh
index cad25bd..0707cb9 100755
--- a/ttcn3-asterisk-ims-ue-test/jenkins.sh
+++ b/ttcn3-asterisk-ims-ue-test/jenkins.sh
@@ -74,6 +74,7 @@
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
-e "EXTRA_IPADDR=${EXTRA_IPADDR}" \
+ -e "ASTERISK_IPADDR=${ASTERISK_IPADDR}" \
-v "$VOL_BASE_DIR/asterisk-ims-ue-tester-${test_config}:/data" \
--name "${BUILD_TAG}-ttcn3-asterisk-ims-ue-test" \
$DOCKER_ARGS \
@@ -109,17 +110,19 @@
if [ "$i" = "ipv4" ]; then
NETMASK_PREFIX="24"
SUBNET_IP_PREFIX="$SUB4_PREFIX.$SUBNET"
+ ASTERISK_IPADDR="${SUBNET_IP_PREFIX}.${ASTERISK_IP_SUFFIX}"
DNS_IPADDR="${SUBNET_IP_PREFIX}.${DNS_IP_SUFFIX}"
EXTRA_IPADDR="${SUBNET_IP_PREFIX}.${IMSCORE_IP_SUFFIX}/${NETMASK_PREFIX}"
elif [ "$i" = "ipv6" ]; then
NETMASK_PREFIX="64"
SUBNET_IP_PREFIX="$SUB6_PREFIX:$SUBNET"
+ ASTERISK_IPADDR="${SUBNET_IP_PREFIX}::${ASTERISK_IP_SUFFIX}"
DNS_IPADDR="${SUBNET_IP_PREFIX}::${DNS_IP_SUFFIX}"
EXTRA_IPADDR="${SUBNET_IP_PREFIX}::${IMSCORE_IP_SUFFIX}/${NETMASK_PREFIX}"
# Replace IPv4 addresses with IPv6 ones:
REPLACE_V4_TO_V6_EXPR="s,${SUB4_PREFIX}\.${SUBNET}\.,${SUB6_PREFIX}:${SUBNET}::,g"
- REPLACE_V4_TO_V6_PORT_EXPR="s,${SUB4_PREFIX}\.${SUBNET}\.${ASTERISK_IP_SUFFIX}:,[${SUB6_PREFIX}:${SUBNET}::${ASTERISK_IP_SUFFIX}]:,g"
+ REPLACE_V4_TO_V6_PORT_EXPR="s,${SUB4_PREFIX}\.${SUBNET}\.${ASTERISK_IP_SUFFIX}:,[${ASTERISK_IPADDR}]:,g"
sed -i -E -e "${REPLACE_V4_TO_V6_EXPR}" "${VOL_BASE_DIR}/dnsmasq-${i}"/*.conf
sed -i -E -e "s,${SUB4_PREFIX}\.${SUBNET}\.${TTCN3_IP_SUFFIX}/24,${SUB6_PREFIX}:${SUBNET}::${TTCN3_IP_SUFFIX}/${NETMASK_PREFIX},g" "${VOL_BASE_DIR}/asterisk-${i}"/manager.conf
sed -i -E -e "s,${SUB4},${SUB6},g" "${VOL_BASE_DIR}/asterisk-${i}"/*.conf
@@ -130,8 +133,6 @@
start_dnsmasq "$i"
start_asterisk "$i"
- # Leave some time for asterisk to start:
- sleep 5
start_testsuite "$i"
docker_kill_wait "$BUILD_TAG"-asterisk || true
diff --git a/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh b/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh
index e1d4fac..5787d1f 100755
--- a/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh
+++ b/ttcn3-asterisk-ims-ue-test/ttcn3/ttcn3.sh
@@ -13,4 +13,13 @@
# IPv6 addresses may take an extra while to be available ('tentative' state):
while [ -n "$(ip -6 addr show tentative)" ]; do sleep 1; done
+# Wait for Asterisk to be ready, which in turn may be waiting for dnsmasq to be ready...
+for i in $(seq 100); do
+ set -e
+ netcat -z -v "${ASTERISK_IPADDR}" 5038 && break
+ set +e
+ echo "[$i] Asterisk AMI ${ASTERISK_IPADDR} (port 5038) not ready, waiting..."
+ sleep 1
+done
+
ttcn3-docker-run asterisk Asterisk_Tests
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37471?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I337d57f3eb3e6688dbf3c61d55978da10d84b2cb
Gerrit-Change-Number: 37471
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37472?usp=email )
Change subject: asterisk: dnsmasq.conf: Avoid forwarding queries to other DNS servers
......................................................................
asterisk: dnsmasq.conf: Avoid forwarding queries to other DNS servers
This creates problems when requesting resolution of the IPv6 address.
For some reason, dnsmasq was forwarding the request to the non-available
google DNS servers, and Asterisk docker container pre-start commands
checking for DNS resolution would never pass when run in jenkins node.
Change-Id: I0ee7a7b0c307cc83acfb1c4c8f4bdc092133fddb
---
M ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf
1 file changed, 14 insertions(+), 4 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf b/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf
index 9c7b703..63a8566 100644
--- a/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf
+++ b/ttcn3-asterisk-ims-ue-test/dnsmasq/dnsmasq.conf
@@ -4,10 +4,6 @@
no-resolv
listen-address=::1,fd02:db8:11::200,127.0.0.1,172.18.11.200
-#use google as default nameservers
-server=8.8.4.4
-server=8.8.8.8
-
# PCSCF IP!
host-record=ims.mnc001.mcc238.3gppnetwork.org,172.18.11.104
srv-host=_sip._tcp.ims.mnc001.mcc238.3gppnetwork.org,ims.mnc001.mcc238.3gppnetwork.org,5060
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37472?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I0ee7a7b0c307cc83acfb1c4c8f4bdc092133fddb
Gerrit-Change-Number: 37472
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37467?usp=email )
Change subject: centos7: use vault.centos.org
......................................................................
centos7: use vault.centos.org
The centos7 images try to use mirrorlist.centos.org to determine the
fastest mirror, and then download binary packages from there. But
mirrorlist.centos.org isn't online anymore. Use the vault instead.
Without this patch, the mirrors that can't be reached are ignored, and
later on it fails to properly install packages because of missing
dependencies.
Related: https://serverfault.com/a/1161847
Change-Id: I0a8f93bb16dd9245760b8a1ad53f0642d446b4cf
---
M centos7-build/Dockerfile
M centos7-obs-latest/Dockerfile
2 files changed, 32 insertions(+), 0 deletions(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
daniel: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
diff --git a/centos7-build/Dockerfile b/centos7-build/Dockerfile
index f449d42..d4b152c 100644
--- a/centos7-build/Dockerfile
+++ b/centos7-build/Dockerfile
@@ -5,6 +5,13 @@
ARG OSMOCOM_REPO_MIRROR="https://downloads.osmocom.org"
ARG OSMOCOM_REPO_PATH="packages/osmocom:"
+# Use vault.centos.org instead of mirrorlist.centos.org, which doesn't exist
+# anymore (see https://serverfault.com/a/1161847).
+RUN set -x && \
+ sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
+
# Use dnf package manager instead of yum, so we can use all the dnf codepaths
# that were originally written for CentOS8 in this CentOS7 image too
RUN yum install -y dnf
diff --git a/centos7-obs-latest/Dockerfile b/centos7-obs-latest/Dockerfile
index 2c06882..7da0db3 100644
--- a/centos7-obs-latest/Dockerfile
+++ b/centos7-obs-latest/Dockerfile
@@ -6,6 +6,13 @@
ARG OSMOCOM_REPO_PATH="packages/osmocom:"
ARG OSMOCOM_REPO_VERSION="latest"
+# Use vault.centos.org instead of mirrorlist.centos.org, which doesn't exist
+# anymore (see https://serverfault.com/a/1161847).
+RUN set -x && \
+ sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
+ sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
+
# Use dnf package manager instead of yum, so we can use all the dnf codepaths
# that were originally written for CentOS8 in this CentOS7 image too
RUN yum install -y dnf
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37467?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I0a8f93bb16dd9245760b8a1ad53f0642d446b4cf
Gerrit-Change-Number: 37467
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged