mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-27 09:21:59 -06:00
perform IPA client uninstallation as a last step of server uninstall
With the ability to promote replicas from an enrolled client the uninstallation procedure has to be changed slightly. If the client-side components are not removed last during replica uninstallation, we can end up with leftover ipa default.conf preventing future client re-enrollment. https://fedorahosted.org/freeipa/ticket/5410 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
parent
4854850867
commit
f6240f21fc
@ -1046,19 +1046,6 @@ def uninstall(installer):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
print("Removing IPA client configuration")
|
|
||||||
try:
|
|
||||||
(stdout, stderr, rc) = run([paths.IPA_CLIENT_INSTALL, "--on-master",
|
|
||||||
"--unattended", "--uninstall"],
|
|
||||||
raiseonerr=False)
|
|
||||||
if rc not in [0, 2]:
|
|
||||||
root_logger.debug("ipa-client-install returned %d" % rc)
|
|
||||||
raise RuntimeError(stdout)
|
|
||||||
except Exception as e:
|
|
||||||
rv = 1
|
|
||||||
print("Uninstall of client side components failed!")
|
|
||||||
print("ipa-client-install returned: " + str(e))
|
|
||||||
|
|
||||||
ntpinstance.NTPInstance(fstore).uninstall()
|
ntpinstance.NTPInstance(fstore).uninstall()
|
||||||
|
|
||||||
kra.uninstall(False)
|
kra.uninstall(False)
|
||||||
@ -1138,6 +1125,19 @@ def uninstall(installer):
|
|||||||
' # getcert stop-tracking -i <request_id>\n'
|
' # getcert stop-tracking -i <request_id>\n'
|
||||||
'for each id in: %s' % ', '.join(ids))
|
'for each id in: %s' % ', '.join(ids))
|
||||||
|
|
||||||
|
print("Removing IPA client configuration")
|
||||||
|
try:
|
||||||
|
(stdout, stderr, rc) = run([paths.IPA_CLIENT_INSTALL, "--on-master",
|
||||||
|
"--unattended", "--uninstall"],
|
||||||
|
raiseonerr=False)
|
||||||
|
if rc not in [0, 2]:
|
||||||
|
root_logger.debug("ipa-client-install returned %d" % rc)
|
||||||
|
raise RuntimeError(stdout)
|
||||||
|
except Exception as e:
|
||||||
|
rv = 1
|
||||||
|
print("Uninstall of client side components failed!")
|
||||||
|
print("ipa-client-install returned: " + str(e))
|
||||||
|
|
||||||
sys.exit(rv)
|
sys.exit(rv)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user