From 7660f40e2bedf6dce5c569f1be64a80934a952a3 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Thu, 7 May 2015 11:03:27 +0200 Subject: Server Upgrade: Do not start DS if it was stopped before upgrade https://fedorahosted.org/freeipa/ticket/4904 Reviewed-By: David Kupka --- ipaserver/install/upgradeinstance.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ipaserver') diff --git a/ipaserver/install/upgradeinstance.py b/ipaserver/install/upgradeinstance.py index 1466450b2..ad9839e6b 100644 --- a/ipaserver/install/upgradeinstance.py +++ b/ipaserver/install/upgradeinstance.py @@ -183,7 +183,9 @@ class IPAUpgrade(service.Service): super(IPAUpgrade, self).stop(self.serverid) def create_instance(self): - self.step("stopping directory server", self.__stop_instance) + ds_running = super(IPAUpgrade, self).is_running() + if ds_running: + self.step("stopping directory server", self.__stop_instance) self.step("saving configuration", self.__save_config) self.step("disabling listeners", self.__disable_listeners) self.step("enabling DS global lock", self.__enable_ds_global_write_lock) @@ -196,8 +198,8 @@ class IPAUpgrade(service.Service): run_after_failure=True) self.step("restoring configuration", self.__restore_config, run_after_failure=True) - self.step("starting directory server", self.start) - + if ds_running: + self.step("starting directory server", self.start) self.start_creation(start_message="Upgrading IPA:", show_service_name=False) -- cgit