From 0d3b227c8aac7f501f4d2e89f47bf6de8c37a46a Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 22 Jun 2016 17:50:38 +0200 Subject: bootstrap_admin_node: Fix connectivity check. After Fuel Master builds the bootstrap image at first boot, internet connectivity is tested using the URL for the CentOS updates repository. bootstrap_admin_node.sh script parses the output of `yum repolist`, looking for entries like 'Repo-baseurl: http://...'. However, in Fuel 9.0, points to a mirrorlist file (a text file containing a list of possible mirror URLs) instead of being a single, direct link to the repository. Also, note that in Fuel9, and repos are disabled by default. For now, we only test that we can access the mirrorlist file, while the check should be performed against the mirror(s). Old (Fuel 8) repo entry format: Repo-baseurl: http://mirror.fuel-infra.org/.../updates/x86_64/ New (Fuel 9) mirrorlist format: Repo-mirrors: http://mirror.fuel-infra.org/.../mos-mirrors-updates.txt Backported from upstream change [1], which should fix bug [2]. This change will get merged upstream in Fuel 10. [1] https://review.openstack.org/#/c/335094/ [2] https://bugs.launchpad.net/fuel/+bug/1596981 Change-Id: Ibec397af2e1d925a011907f14e1d655741e280fb Signed-off-by: Alexandru Avadanii --- build/bootstrap_admin_node.sh.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build') diff --git a/build/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh.patch index 129339abd..d3769adfb 100644 --- a/build/bootstrap_admin_node.sh.patch +++ b/build/bootstrap_admin_node.sh.patch @@ -70,3 +70,14 @@ index 3197c91..e035145 100755 if [ "`get_bootstrap_skip`" = "False" ]; then build_ubuntu_bootstrap bs_status || true else +@@ -571,8 +571,8 @@ + fi + + #Check if repo is accessible +-echo "Checking for access to updates repository..." +-repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl" && $3 ~ "updates") print $3}' | head -1) ++echo "Checking for access to updates repository/mirrorlist..." ++repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl|mirrors" && $3 ~ "updates") print $3}' | head -1) + if urlaccesscheck check "$repourl" ; then + UPDATE_ISSUES=0 + else -- cgit 1.2.3-korg