From d70725a395a5e54a8ed333743ee1d3ffe3b8a543 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Mon, 24 Jul 2017 12:03:24 +0200 Subject: [PATCH] TT#18174 Fix silent ngcp-installer errors due to forgotten descriptors into chroot deployment.sh reported 'Installation succesfull finished' in case of ngcp-installer failed due to forgotten descriptors into chroot+ssh, see more details here http://mika.soup.io/post/617103994/Debugging-a-mystery-ssh-causing-strange-exit Change-Id: I4ae12270788291e66189f2f1ec522ae3764d6cca --- deployment.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/deployment.sh b/deployment.sh index 0b084cd..6d6247d 100644 --- a/deployment.sh +++ b/deployment.sh @@ -1728,8 +1728,9 @@ EOT # generate installer configs gen_installer_config - # execute ngcp-installer - cat << "EOT" | grml-chroot $TARGET /bin/bash + # generate ngcp-installer run script + cat > "${TARGET}/tmp/ngcp-installer-deployment.sh" << "EOT" +#!/bin/bash echo "Running ngcp-installer via grml-chroot." | tee -a /tmp/ngcp-installer-debug.log ngcp-installer 2>&1 | tee -a /tmp/ngcp-installer-debug.log RC=${PIPESTATUS[0]} @@ -1741,11 +1742,12 @@ else fi EOT - if [ $? -eq 0 ] ; then + # execute ngcp-installer + if grml-chroot "${TARGET}" /bin/bash /tmp/ngcp-installer-deployment.sh ; then logit "installer: success" else logit "installer: error" - die "Error during installation of ngcp. Find details at: $TARGET/tmp/ngcp-installer.log $TARGET/tmp/ngcp-installer-debug.log" + die "Error during installation of ngcp. Find details at: ${TARGET}/tmp/ngcp-installer.log ${TARGET}/tmp/ngcp-installer-debug.log" fi # upload db dump only if we're deploying a trunk version