summaryrefslogtreecommitdiffstats
path: root/fuel
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2015-09-26 00:30:44 +0200
committerJonas Bjurel <jonas.bjurel@ericsson.com>2015-09-26 10:06:14 +0000
commit62c0166df8d9c411ccedd5fe9a308e4d7d7aa3f7 (patch)
tree31c72fc660b49d4f073f360c7f25bae0cefee82f /fuel
parentd01e1866e89fb428099880aea73a8fdbe5749e64 (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> (cherry picked from commit f2752258649dc714a3c0adc8fa6aa4cfab405a45)
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