URL: https://github.com/freeipa/freeipa/pull/763
Author: stlaz
 Title: #763: Dogtag fail
Action: opened

PR body:
"""
**Make CA/KRA fail when they don't start**

Since all the services throw exceptions when we're unable to
start/restart them, CA/KRA should not be an exception to it.

**Fix wrong message on Dogtag instances stop**

https://pagure.io/freeipa/issue/6766
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/763/head:pr763
git checkout pr763
From c3ab7b00b28bd349119371a214a3a3a22ab4c133 Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Thu, 4 May 2017 14:58:46 +0200
Subject: [PATCH 1/2] Make CA/KRA fail when they don't start

Since all the services throw exceptions when we're unable to
start/restart them, CA/KRA should not be an exception to it.

https://pagure.io/freeipa/issue/6766
---
 ipaserver/install/dogtaginstance.py | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py
index 356358a..f79031b 100644
--- a/ipaserver/install/dogtaginstance.py
+++ b/ipaserver/install/dogtaginstance.py
@@ -156,22 +156,10 @@ def clean_pkispawn_files(self):
                       ignore_errors=True)
 
     def restart_instance(self):
-        try:
-            self.restart('pki-tomcat')
-        except Exception:
-            self.log.debug(traceback.format_exc())
-            self.log.critical(
-                "Failed to restart the Dogtag instance."
-                "See the installation log for details.")
+        self.restart('pki-tomcat')
 
     def start_instance(self):
-        try:
-            self.start('pki-tomcat')
-        except Exception:
-            self.log.debug(traceback.format_exc())
-            self.log.critical(
-                "Failed to restart the Dogtag instance."
-                "See the installation log for details.")
+        self.start('pki-tomcat')
 
     def stop_instance(self):
         try:

From fd1b004ea772fff154199f79a2750eaf45fab14e Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Thu, 4 May 2017 15:00:33 +0200
Subject: [PATCH 2/2] Fix wrong message on Dogtag instances stop

https://pagure.io/freeipa/issue/6766
---
 ipaserver/install/dogtaginstance.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py
index f79031b..831d996 100644
--- a/ipaserver/install/dogtaginstance.py
+++ b/ipaserver/install/dogtaginstance.py
@@ -167,7 +167,7 @@ def stop_instance(self):
         except Exception:
             self.log.debug(traceback.format_exc())
             self.log.critical(
-                "Failed to restart the Dogtag instance."
+                "Failed to stop the Dogtag instance."
                 "See the installation log for details.")
 
     def enable_client_auth_to_db(self, config):
-- 
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