URL: https://github.com/freeipa/freeipa/pull/495
Author: stlaz
 Title: #495: Fix ipa-server-upgrade
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/495/head:pr495
git checkout pr495
From 499ce6c6ef6f921f0be875780cee7ca5f70b6414 Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Wed, 22 Feb 2017 12:38:19 +0100
Subject: [PATCH] Fix ipa-server-upgrade

Running ipa-server-upgrade would fail to stop ipa_memcached if
it's already uninstalled.

https://fedorahosted.org/freeipa/ticket/5959
---
 ipaserver/install/server/upgrade.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
index 26f6b8f..e5d9de4 100644
--- a/ipaserver/install/server/upgrade.py
+++ b/ipaserver/install/server/upgrade.py
@@ -83,7 +83,8 @@ def uninstall_ipa_memcached():
     """
     ipa_memcached = service.SimpleServiceInstance('ipa_memcached')
 
-    ipa_memcached.uninstall()
+    if ipa_memcached.is_configured():
+        ipa_memcached.uninstall()
 
 
 def backup_file(filename, ext):
-- 
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