diff options
| author | Simo Sorce <simo@redhat.com> | 2017-01-25 08:56:15 -0500 |
|---|---|---|
| committer | Simo Sorce <simo@redhat.com> | 2017-02-14 17:37:48 -0500 |
| commit | 51ea32d521917fc26f33ef35619802053fbe5a51 (patch) | |
| tree | ee192f30ca91808ed820a159a720a6ab339e8f8d | |
| parent | 6101ef1c1c043ef91d61f1497351f7388625cdfc (diff) | |
| download | freeipa-51ea32d521917fc26f33ef35619802053fbe5a51.tar.gz freeipa-51ea32d521917fc26f33ef35619802053fbe5a51.tar.xz freeipa-51ea32d521917fc26f33ef35619802053fbe5a51.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>
| -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 9ee19987e..f1952fe84 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -1038,9 +1038,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() |
