summaryrefslogtreecommitdiffstats
path: root/fuel
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2015-09-26 00:30:44 +0200
committerMichal Skalski <mskalski@mirantis.com>2015-09-26 11:16:13 +0200
commitf2752258649dc714a3c0adc8fa6aa4cfab405a45 (patch)
tree001689cc23fe18f46b880d0c52085afcb48b987a /fuel
parentd8d4303b2cea8dca0ce67407b6a60145dbfe111c (diff)
Try to choose close ubuntu mirror
As described in this bug https://bugs.launchpad.net/fuel/+bug/1459252 slow connection to ubuntu mirror can lead to errors. Lets try choose mirror which is near build server. Change-Id: I7a367cbb6edbcf30dceb52934a9adf35cbd7ce5a Signed-off-by: Michal Skalski <mskalski@mirantis.com>
Diffstat (limited to 'fuel')
-rw-r--r--fuel/build/f_isoroot/f_repobuild/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/fuel/build/f_isoroot/f_repobuild/Makefile b/fuel/build/f_isoroot/f_repobuild/Makefile
index b8f0aa2..8722cbb 100644
--- a/fuel/build/f_isoroot/f_repobuild/Makefile
+++ b/fuel/build/f_isoroot/f_repobuild/Makefile
@@ -8,10 +8,17 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+SHELL := /bin/bash
TOP := $(shell pwd)
DOCKNAME = fuelrepo
DOCKVERSION = 1.0
+# try to choose close ubuntu mirror which support rsync protocol
+# https://bugs.launchpad.net/fuel/+bug/1459252
+MIRROR_URLS := $(shell curl -s http://mirrors.ubuntu.com/mirrors.txt)
+MIRROR_HOSTS := $(shell for url in ${MIRROR_URLS}; do echo $$url | cut -d'/' -f3; done)
+RSYNC_HOST := $(shell for host in ${MIRROR_HOSTS}; do echo > /dev/tcp/$${host}/873 && echo $$host && break; done)
+
.PHONY: all
all: .nailgun
@@ -26,6 +33,9 @@ all: .nailgun
fusermount -u tmpiso
rm -rf tmpiso
sudo dpkg -i fuel-createmirror_6.1*.deb
+ sudo sed -i 's/DOCKER_MODE=true/DOCKER_MODE=false/' /etc/fuel-createmirror/common.cfg
+ sudo sed -i 's/DEBUG="no"/DEBUG="yes"/' /etc/fuel-createmirror/ubuntu.cfg
+ sudo sed -i 's/MIRROR_UBUNTU_HOST="archive.ubuntu.com"/MIRROR_UBUNTU_HOST="${RSYNC_HOST}"/' /etc/fuel-createmirror/common.cfg
rm -Rf nailgun
sudo mkdir -p /var/www
sudo su - -c /opt/fuel-createmirror-6.1/fuel-createmirror