diff options
Diffstat (limited to 'build/f_isoroot/f_bootstrap')
-rwxr-xr-x | build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh | 44 |
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 } |