Browse Source

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>
Alexandru Avadanii 2 years ago
parent
commit
ab98c79af0
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      iso/bootstrap_admin_node.sh

+ 2
- 2
iso/bootstrap_admin_node.sh View File

@@ -545,8 +545,8 @@ else
545 545
 fi
546 546
 
547 547
 #Check if repo is accessible
548
-echo "Checking for access to updates repository..."
549
-repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl" && $3 ~ "updates") print $3}' | head -1)
548
+echo "Checking for access to updates repository/mirrorlist..."
549
+repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl|mirrors" && $3 ~ "updates") print $3}' | head -1)
550 550
 if urlaccesscheck check "$repourl" ; then
551 551
   UPDATE_ISSUES=0
552 552
 else

Loading…
Cancel
Save