Missing record in ipaupgrade.log that upgrade failed because IPA is not installed, causes harder time to debugging upgrade from log.

Patch attached.
From f457b0996fcc8d6a6e0bf95763a25b518e370501 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Wed, 27 Jan 2016 15:09:32 +0100
Subject: [PATCH] Upgrade: log to ipaupgrade.log when IPA server is not
 installed

Message was printed only to stdout and leaves ipaupgrade.log without any
record that ipa-server-upgrade failed because ipa server is not
installed.
Now error is passed to logger which prints meassage to stderr and
ipaupgrade.log.
---
 ipaserver/install/server/upgrade.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
index 20379f19c652cb0b5911a4c2f1c67eae7f763379..844a2a3fb597fe0b2e6aca6f7e81e06142314d72 100644
--- a/ipaserver/install/server/upgrade.py
+++ b/ipaserver/install/server/upgrade.py
@@ -1647,7 +1647,7 @@ def upgrade_check(options):
     try:
         installutils.check_server_configuration()
     except RuntimeError as e:
-        print(unicode(e))
+        root_logger.error(e)
         sys.exit(1)
 
     try:
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to