From efe8f26ddf81db471bbce693dacd35f80e7615e2 Mon Sep 17 00:00:00 2001 From: Gabe Date: Sun, 8 Nov 2015 17:18:17 -0700 Subject: ipa-replica-manage del continues when host does not exist in domain level 1 - Raises error and stops operation unless --cleanup is specified. https://fedorahosted.org/freeipa/ticket/5424 Reviewed-By: Martin Basti --- install/tools/ipa-replica-manage | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage index b9998da44..2de6fd799 100755 --- a/install/tools/ipa-replica-manage +++ b/install/tools/ipa-replica-manage @@ -740,7 +740,13 @@ def del_master_managed(realm, hostname, options): try: api.Command.server_del(hostname_u) except errors.NotFound: - print("Server entry already deleted: %s" % (hostname)) + if not options.cleanup: + print("{hostname} does not exist.".format(hostname=hostname)) + print("Please specify an actual server or add the --cleanup " + "option to force clean up.") + sys.exit(1) + else: + print("Server entry already deleted: %s" % (hostname)) # 6. Cleanup try: -- cgit