aboutsummaryrefslogtreecommitdiffstats
path: root/build/f_isoroot/f_bootstrap
diff options
context:
space:
mode:
authorStefan K. Berg <stefan.k.berg@ericsson.com>2016-01-20 17:53:55 +0100
committerStefan Berg <sfb@consultron.com>2016-01-29 13:59:45 +0100
commit80b903bcafeaf10c8d4f1270599d1c770703abab (patch)
treeace5a545cf11b2c188b927a4c4582b2a30c93606 /build/f_isoroot/f_bootstrap
parentb65326f28448764f8993ceb856030615f68a9dfc (diff)
Turn on fuelmenu by default, turn off biosdevname
Added experimental Fuel build loop, rebuilding up to ten times while keeping the package cache, in the hope that all packages will be able to download. Added snapshot support into this script as well. Changed naming of OPNFV iso label to OPNFV_FUEL_<id>, made changes in ks.cfg and isolinux.cfg to look for this name at install. Change-Id: Ic28a3af769cfc90416d7d988afd6f07eadcef4f1 Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com> (cherry picked from commit 35697966da656585c43e2a2342a135ada65703cb)
Diffstat (limited to 'build/f_isoroot/f_bootstrap')
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/bootstrap_admin_node.sh44
1 files changed, 18 insertions, 26 deletions
diff --git a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
index 065d0cb7d..6318c5d39 100755
--- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
+++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh
@@ -111,32 +111,24 @@ get_bootstrap_flavor () {
# Actually build the bootstrap image
build_ubuntu_bootstrap () {
- local ret=1
- local max_attempts=3
- local config='/etc/fuel-bootstrap-image.conf'
- local log='/var/log/fuel-bootstrap-image-build.log'
- if ! grep -qE '^BOOTSTRAP_SSH_KEYS' "$config"; then
- # FIXME: config file generated by fuelmenu has no trailing newline
- echo >> "$config"
- cat >> "$config" <<-EOF
- BOOTSTRAP_SSH_KEYS=/root/.ssh/id_rsa.pub
- EOF
- fi
- for n in `seq 1 $max_attempts`; do
- echo "Bulding bootstrap image, attempt $n" >&2
- if fuel-bootstrap-image >>"$log" 2>&1; then
- ret=0
- fuel-bootstrap-image-set "ubuntu"
- break
- fi
- done
- if [ $ret -ne 0 ]; then
- warning="WARNING: failed to build the bootstrap image, see $log for details.
-Perhaps your Internet connection is broken. Please fix the problem and run
-\`fuel-bootstrap-image-set ubuntu\`"
- fuel notify --topic warning --send "$warning"
- fi
- return $ret
+ local ret=1
+ echo ${bs_progress_message} >&2
+ set_ui_bootstrap_error "${bs_progress_message}" >&2
+# OPNFV modification to turn off biosdevname on the line below (extend-kopts)
+ if fuel-bootstrap -v --debug build --activate \
+ --extend-kopts "biosdevname=0 net.ifnames=0 debug ignore_loglevel log_buf_len=10M print_fatal_signals=1 LOGLEVEL=8" \
+ >>"$bs_build_log" 2>&1; then
+ ret=0
+ fuel notify --topic "done" --send "${bs_done_message}"
+ else
+ ret=1
+ set_ui_bootstrap_error "${bs_error_message}" >&2
+ fi
+ # perform hard-return from func
+ # this part will update input $1 variable
+ local __resultvar=$1
+ eval $__resultvar="'${ret}'"
+ return $ret
}