diff options
author | Martin Basti <mbasti@redhat.com> | 2015-07-08 12:19:58 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-07-08 12:58:50 +0000 |
commit | 21b04769b952e4f237f8490cce0f33d76a2decf2 (patch) | |
tree | 389a4636dda50ea0c4a694c89b893599b2ee4e0c | |
parent | 232458a222435c80c28d6179f164673de67e2544 (diff) | |
download | freeipa-21b04769b952e4f237f8490cce0f33d76a2decf2.tar.gz freeipa-21b04769b952e4f237f8490cce0f33d76a2decf2.tar.xz freeipa-21b04769b952e4f237f8490cce0f33d76a2decf2.zip |
Upgrade: Do not show upgrade failed message when IPA is not installed
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r-- | freeipa.spec.in | 2 | ||||
-rw-r--r-- | ipaserver/install/ipa_server_upgrade.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in index 415a875fa..7e1ad4615 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -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 diff --git a/ipaserver/install/ipa_server_upgrade.py b/ipaserver/install/ipa_server_upgrade.py index d0a839d0a..2ebdf9185 100644 --- a/ipaserver/install/ipa_server_upgrade.py +++ b/ipaserver/install/ipa_server_upgrade.py @@ -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) |