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, <updates> 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.

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

Closes-Bug: #1596981

Change-Id: I21268dd8aa8cd633f09f921b4a9e1c057a4b8ed3
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
This commit is contained in:
Alexandru Avadanii 2016-06-28 17:32:03 +02:00
parent d9d2a471af
commit ab98c79af0
1 changed files with 2 additions and 2 deletions

View File

@ -545,8 +545,8 @@ else
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