Ensure error message written in log on master node bootstrap
Log message from fail() function [1] doesn't appear in logs, because of output stream buffering issue [2], so we need to flush data explicitly using sed. This patch aligns testflow for master node wait_bootstrap function [3], since we need to fail deployment ASAP rather then wait for timeout [1]. https://github.com/openstack/fuel-main/blob/master/iso/bootstrap_admin_node.sh#L113 [2]. http://www.pixelbeat.org/programming/stdio_buffering/ [3]. https://github.com/openstack/fuel-qa/blob/master/fuelweb_test/models/environment.py#L556 Closes-bug: #1551658 Related-bug #1549302 Change-Id: I3f0d48a8d5c3ce36dd01724f48d2a1180d2f5335
This commit is contained in:
parent
e38c44b62a
commit
03b01bfe1a
|
@ -111,7 +111,10 @@ function countdown() {
|
|||
}
|
||||
|
||||
function fail() {
|
||||
echo "ERROR: Fuel node deployment FAILED! Check "${LOGFILE}" for details" 1>&2
|
||||
MSG="ERROR: Fuel node deployment FAILED! Check ${LOGFILE} for details"
|
||||
# LP: #1551658 - Ensure data will be flushed on disk
|
||||
sed -i -u "\$a${MSG}" "${LOGFILE}"
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -501,10 +504,7 @@ if [ ${old_sysctl_vm_value} -lt 65535 ]; then
|
|||
fi
|
||||
|
||||
# apply puppet
|
||||
/etc/puppet/modules/fuel/examples/deploy.sh
|
||||
if [[ $? -ne 0 ]]; then
|
||||
fail
|
||||
fi
|
||||
/etc/puppet/modules/fuel/examples/deploy.sh || fail
|
||||
|
||||
# Sync time
|
||||
systemctl stop ntpd
|
||||
|
|
Loading…
Reference in New Issue