Skip to content

Commit

Permalink
log the output of supportconfig
Browse files Browse the repository at this point in the history
So that we can find out what went wrong if supportconfig is unable
to complete successfully.
  • Loading branch information
guangyee committed Jan 31, 2019
1 parent 11a8232 commit 3aa8acf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/mkcloud
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,21 @@ function onhost_supportconfig
for node in $(crowbar machines list | grep ^d) ; do
(
echo "Collecting supportconfig from $node"
timeout 1200 ssh $node supportconfig | wc
SUPPORTCONFIG_OUT=/tmp/supportconfig-output-$node
timeout 1200 ssh $node supportconfig > $SUPPORTCONFIG_OUT 2>&1
SUPPORTCONFIG_STATUS=$?
echo "$SUPPORTCONFIG_OUT: `wc $SUPPORTCONFIG_OUT`"
if [ $SUPPORTCONFIG_STATUS -ne 0 ]; then
timeout 300 scp $node:$SUPPORTCONFIG_OUT /var/log/
fi
timeout 300 scp $node:/var/log/\*tbz /var/log/
)&
done
timeout 600 supportconfig | wc &
wait
'
$scp root@$(wrap_ip $adminip):/var/log/*tbz $artifacts_dir/
$scp root@$(wrap_ip $adminip):/var/log/supportconfig-* $artifacts_dir/ | true
fi
}

Expand Down

0 comments on commit 3aa8acf

Please sign in to comment.