From 74f53db80b0fb55f4a8d15e88add63f0ef3147ec Mon Sep 17 00:00:00 2001 From: Michal Skalski Date: Mon, 25 Jan 2016 21:35:53 +0100 Subject: Sync with recent changes in fuel-main Change-Id: Ife63c8c69e0e17150c198a7a75788a13b8df0d81 Signed-off-by: Michal Skalski --- .../f_isoroot/f_bootstrap/bootstrap_admin_node.sh | 22 +++++++++++++++------- .../f_bootstrap/bootstrap_admin_node.sh.orig | 22 +++++++++++++++------- build/f_isoroot/f_odlpluginbuild/Makefile | 3 ++- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh index ca61785e4..a5ca56c64 100755 --- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh +++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh @@ -3,7 +3,8 @@ mkdir -p /var/log/puppet exec > >(tee -i /var/log/puppet/bootstrap_admin_node.log) exec 2>&1 -FUEL_RELEASE=$(grep release: /etc/fuel/version.yaml | cut -d: -f2 | tr -d '" ') +FUEL_RELEASE=$(cat /etc/fuel_release) +ASTUTE_YAML='/etc/fuel/astute.yaml' BOOTSTRAP_NODE_CONFIG="/etc/fuel/bootstrap_admin_node.conf" bs_build_log='/var/log/fuel-bootstrap-image-build.log' bs_status=0 @@ -48,6 +49,8 @@ update_done_message="We recommend reviewing and applying Maintenance Updates \ for this release of Mirantis OpenStack: \ https://docs.mirantis.com/openstack/fuel/fuel-${FUEL_RELEASE}/\ release-notes.html#maintenance-updates" +fuelmenu_fail_message="Fuelmenu was not able to generate '/etc/fuel/astute.yaml' file! \ +Please, restart it manualy using 'fuelmenu' command." function countdown() { local i @@ -236,6 +239,11 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then fi fi +if [ ! -f "${ASTUTE_YAML}" ]; then + echo ${fuelmenu_fail_message} + fail +fi + systemctl reload sshd # Enable iptables @@ -285,19 +293,19 @@ make_ubuntu_bootstrap_stub () { } get_bootstrap_flavor () { - local ASTUTE_YAML='/etc/fuel/astute.yaml' python <<-EOF - from fuelmenu.fuelmenu import Settings - conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {}) + from yaml import safe_load + with open("$ASTUTE_YAML", 'r') as f: + conf = safe_load(f).get('BOOTSTRAP', {}) print(conf.get('flavor', 'centos').lower()) EOF } get_bootstrap_skip () { - local ASTUTE_YAML='/etc/fuel/astute.yaml' python <<-EOF - from fuelmenu.fuelmenu import Settings - conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {}) + from yaml import safe_load + with open("$ASTUTE_YAML", 'r') as f: + conf = safe_load(f).get('BOOTSTRAP', {}) print(conf.get('skip_default_img_build', False)) EOF } diff --git a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig index e1c3c7365..69e38e42a 100755 --- a/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig +++ b/build/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig @@ -3,7 +3,8 @@ mkdir -p /var/log/puppet exec > >(tee -i /var/log/puppet/bootstrap_admin_node.log) exec 2>&1 -FUEL_RELEASE=$(grep release: /etc/fuel/version.yaml | cut -d: -f2 | tr -d '" ') +FUEL_RELEASE=$(cat /etc/fuel_release) +ASTUTE_YAML='/etc/fuel/astute.yaml' BOOTSTRAP_NODE_CONFIG="/etc/fuel/bootstrap_admin_node.conf" bs_build_log='/var/log/fuel-bootstrap-image-build.log' bs_status=0 @@ -48,6 +49,8 @@ update_done_message="We recommend reviewing and applying Maintenance Updates \ for this release of Mirantis OpenStack: \ https://docs.mirantis.com/openstack/fuel/fuel-${FUEL_RELEASE}/\ release-notes.html#maintenance-updates" +fuelmenu_fail_message="Fuelmenu was not able to generate '/etc/fuel/astute.yaml' file! \ +Please, restart it manualy using 'fuelmenu' command." function countdown() { local i @@ -222,6 +225,11 @@ if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then fi fi +if [ ! -f "${ASTUTE_YAML}" ]; then + echo ${fuelmenu_fail_message} + fail +fi + # Enable sshd systemctl enable sshd systemctl start sshd @@ -273,19 +281,19 @@ make_ubuntu_bootstrap_stub () { } get_bootstrap_flavor () { - local ASTUTE_YAML='/etc/fuel/astute.yaml' python <<-EOF - from fuelmenu.fuelmenu import Settings - conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {}) + from yaml import safe_load + with open("$ASTUTE_YAML", 'r') as f: + conf = safe_load(f).get('BOOTSTRAP', {}) print(conf.get('flavor', 'centos').lower()) EOF } get_bootstrap_skip () { - local ASTUTE_YAML='/etc/fuel/astute.yaml' python <<-EOF - from fuelmenu.fuelmenu import Settings - conf = Settings().read("$ASTUTE_YAML").get('BOOTSTRAP', {}) + from yaml import safe_load + with open("$ASTUTE_YAML", 'r') as f: + conf = safe_load(f).get('BOOTSTRAP', {}) print(conf.get('skip_default_img_build', False)) EOF } diff --git a/build/f_isoroot/f_odlpluginbuild/Makefile b/build/f_isoroot/f_odlpluginbuild/Makefile index 4ae81dd11..024cd4a50 100644 --- a/build/f_isoroot/f_odlpluginbuild/Makefile +++ b/build/f_isoroot/f_odlpluginbuild/Makefile @@ -32,7 +32,8 @@ release:.odlbuild sudo gem install fpm sudo pip install fuel-plugin-builder git clone -b $(ODL_BRANCH) $(ODL_REPO) - fpb --debug --build fuel-plugin-opendaylight/ + # Temporary location of working Be snapshot + ODL_TARBALL_LOCATION=http://devel.opt.im/distribution-karaf-0.4.0-20160118.091622-3555.tar.gz fpb --debug --build fuel-plugin-opendaylight/ mv fuel-plugin-opendaylight/opendaylight*.rpm . $(REPOINFO) -r . > gitinfo_odlplugin.txt rm -rf fuel-plugin-opendaylight -- cgit 1.2.3-korg