aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-01-25 21:35:53 +0100
committerMichal Skalski <mskalski@mirantis.com>2016-01-26 00:18:35 +0100
commit74f53db80b0fb55f4a8d15e88add63f0ef3147ec (patch)
treef8ac19188607318aae277a0f8be02f1a804e8673 /build
parent8ce080bcbb40f87c73e040998a83333525fee047 (diff)
Sync with recent changes in fuel-main
Change-Id: Ife63c8c69e0e17150c198a7a75788a13b8df0d81 Signed-off-by: Michal Skalski <mskalski@mirantis.com>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/bootstrap_admin_node.sh22
-rwxr-xr-xbuild/f_isoroot/f_bootstrap/bootstrap_admin_node.sh.orig22
-rw-r--r--build/f_isoroot/f_odlpluginbuild/Makefile3
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