TT#8883 Add puppet repeat dialog

Puppet often fails because puppet cert cleanup or something else forgotten
Normally we want to fix the issue and restart puppet without starting
whole installation from the beginning. Here repeat dialog added
to ask for puppet restart. For daily devops recovery tasks still have an
option to bypass this dialog and proceed to the end if 'nopuppetrepeat'
option is set.

Change-Id: I2a6498628c552aa65d5220c84ade6e12454b8f2d
changes/89/10689/4
Sergii Kipot 8 years ago committed by Alexander Lutay
parent c30c6cd431
commit 40345a6797

@ -2222,13 +2222,33 @@ puppet_install_from_git () {
}
puppet_install_from_puppet () {
echo "Running Puppet core deployment..."
grml-chroot $TARGET puppet agent --test --tags core,apt 2>&1 | tee -a /tmp/puppet.log
check_puppet_rc "${PIPESTATUS[0]}" "2"
echo "Running Puppet deployment..."
grml-chroot $TARGET puppet agent --test 2>&1 | tee -a /tmp/puppet.log
check_puppet_rc "${PIPESTATUS[0]}" "2"
local repeat=true
while $repeat ; do
echo "Running Puppet core deployment..."
grml-chroot $TARGET puppet agent --test --tags core,apt 2>&1 | tee -a /tmp/puppet.log
check_puppet_rc "${PIPESTATUS[0]}" "2"
echo "Running Puppet deployment..."
grml-chroot $TARGET puppet agent --test 2>&1 | tee -a /tmp/puppet.log
check_puppet_rc "${PIPESTATUS[0]}" "2"
if ! checkBootParam nopuppetrepeat && [ "$(get_deploy_status)" = "error" ] ; then
echo "Do you want to [r]epeat puppet run? (Press any other key to continue without repeating.)"
read a
case "$a" in
r)
echo "Repeating puppet run."
repeat=true
;;
*)
echo "Continue without repeating puppet run."
repeat=false
;;
esac
unset a
fi
done
}
set_deploy_status "puppet"

Loading…
Cancel
Save