[SQL upgrade] Catch more errors

This commit is contained in:
andryyy
2019-09-25 12:53:14 +02:00
parent 8b453ab803
commit 8c26371d6d
3 changed files with 5 additions and 4 deletions

View File

@@ -228,7 +228,7 @@ class container_post(Resource):
container.restart()
return jsonify(type='warning', msg='mysql_upgrade: upgrade was applied', text=sql_return.output.decode('utf-8'))
else:
return jsonify(type='error', msg='mysql_upgrade: error running command')
return jsonify(type='error', msg='mysql_upgrade: error running command', text=sql_return.output.decode('utf-8'))
# api call: container_post - post_action: exec - cmd: reload - task: dovecot

View File

@@ -57,7 +57,8 @@ until [[ ${SQL_UPGRADE_STATUS} == 'success' ]]; do
echo "MySQL is up-to-date - debug output:"
echo ${SQL_FULL_UPGRADE_RETURN}
else
echo "No valid reponse for mysql_upgrade was received"
echo "No valid reponse for mysql_upgrade was received, debug output:"
echo ${SQL_FULL_UPGRADE_RETURN}
fi
done