Upgrade: Do not show upgrade failed message when IPA is not installed

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Martin Basti 2015-07-08 12:19:58 +02:00 committed by Jan Cholasta
parent 232458a222
commit 21b04769b9
2 changed files with 6 additions and 1 deletions

View File

@ -536,7 +536,7 @@ fi
%posttrans server
# This must be run in posttrans so that updates from previous
# execution that may no longer be shipped are not applied.
/usr/sbin/ipa-server-upgrade --quiet >/dev/null || echo "IPA server upgrade failed: Inspect /var/log/ipaupgrade.log and run command ipa-server-upgrade manually."
/usr/sbin/ipa-server-upgrade --quiet >/dev/null || :
# Restart IPA processes. This must be also run in postrans so that plugins
# and software is in consistent state

View File

@ -50,4 +50,9 @@ class ServerUpgrade(admintool.AdminTool):
raise admintool.ScriptError(str(e))
def handle_error(self, exception):
if not isinstance(exception, SystemExit):
# do not log this message when ipa is not installed
self.log.error("IPA server upgrade failed: Inspect "
"/var/log/ipaupgrade.log and run command "
"ipa-server-upgrade manually.")
return installutils.handle_error(exception, self.log_file_name)