On 05/12/2015 02:16 PM, Martin Basti wrote:
On 12/05/15 13:53, David Kupka wrote:
DogtagInstance.enable() overrides Service.enable() and does nothing
usefulll. Also removing it solves bug discovered recently in uninstall

this is used in step() call, which means the tomcatd will be enabled in
systemd, and we do not want this.
Services should be disabled and managed just by ipactl.

Which method now store state of tomcatd before IPA changes it?

To solve this please rename method to, for example, store_state(), and
add appropriate description, or put backup_state() call into different
appropriate step.


Thanks for catching that, updated patch attached.

David Kupka
From a7a37a9e662b01668da0c2d9fc1243af4f4e6510 Mon Sep 17 00:00:00 2001
From: David Kupka <dku...@redhat.com>
Date: Tue, 12 May 2015 16:47:29 +0200
Subject: [PATCH] Rename DogtagInstance method enable() to _backup_state().

This method only saves state as the instance is enabled later when
LDAP is available. Additonaly, it was overriding enable() method inherited
from Service class.
 ipaserver/install/cainstance.py     | 2 +-
 ipaserver/install/dogtaginstance.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index 7ba992bef7861d3c964df728ecc64adc958ade61..5c8c0250b26d97b3dbf1b01af5fa292040914a66 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -465,7 +465,7 @@ class CAInstance(DogtagInstance):
             self.step("enabling CRL and OCSP extensions for certificates", self.__set_crl_ocsp_extensions)
             self.step("setting audit signing renewal to 2 years", self.set_audit_renewal)
             self.step("configuring certificate server to start on boot",
-                      self.enable)
+                      self._backup_state)
             if not self.clone:
                 self.step("restarting certificate server", self.restart_instance)
                 self.step("requesting RA certificate from CA", self.__request_ra_certificate)
diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py
index 98929b8640fc91f1c520ddc4c21630464779f2df..e4a1b35f1d408ad9011e36e67823a7ee2cc48efc 100644
--- a/ipaserver/install/dogtaginstance.py
+++ b/ipaserver/install/dogtaginstance.py
@@ -178,7 +178,7 @@ class DogtagInstance(service.Service):
         except ipautil.CalledProcessError, e:
-    def enable(self):
+    def _backup_state(self):
         self.backup_state("enabled", self.is_enabled())
         # We do not let the system start IPA components on its own,
         # Instead we reply on the IPA init script to start only enabled

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

Reply via email to