diff options
author | Simo Sorce <simo@redhat.com> | 2017-01-25 08:56:15 -0500 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2017-02-15 07:13:37 +0100 |
commit | 00a9d2f94dee17e28e39cdae0c32acc3d1fe51ed (patch) | |
tree | f17159fbf662e77289fc4d7968dfd1552270680c | |
parent | 4bd2d6ad46c9151e11f9223dd5383555fdedb249 (diff) | |
download | freeipa-00a9d2f94dee17e28e39cdae0c32acc3d1fe51ed.tar.gz freeipa-00a9d2f94dee17e28e39cdae0c32acc3d1fe51ed.tar.xz freeipa-00a9d2f94dee17e28e39cdae0c32acc3d1fe51ed.zip |
Fix uninstall stopping ipa.service
When uninstalling systemd is told to disable the service, but it is not
told to sopt it, so it believes it is still running. This can cause
issues in some cases if a reinstall is performed right after an
uninstall, as systemd may decide to stop the disabled service while we
are reinstalling, causing the new install to fail.
https://fedorahosted.org/freeipa/ticket/5959
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r-- | ipaserver/install/server/install.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py index a4490bbfc..dd04624fc 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -1034,9 +1034,13 @@ def uninstall(installer): print("Shutting down all IPA services") try: - run([paths.IPACTL, "stop"], raiseonerr=False) + services.knownservices.ipa.stop() except Exception: - pass + # Fallback to direct ipactl stop only if system command fails + try: + run([paths.IPACTL, "stop"], raiseonerr=False) + except Exception: + pass ntpinstance.NTPInstance(fstore).uninstall() |