diff options
author | Gabe <redhatrises@gmail.com> | 2015-11-08 17:18:17 -0700 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2015-11-12 14:54:32 +0100 |
commit | efe8f26ddf81db471bbce693dacd35f80e7615e2 (patch) | |
tree | c4ba93fd259cac6f8e0ce1bfc3089f849d2c78f5 /install/tools | |
parent | ab58ec0d50f172093e75b7834f6ed5e39992c2d9 (diff) | |
download | freeipa-efe8f26ddf81db471bbce693dacd35f80e7615e2.tar.gz freeipa-efe8f26ddf81db471bbce693dacd35f80e7615e2.tar.xz freeipa-efe8f26ddf81db471bbce693dacd35f80e7615e2.zip |
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 <mbasti@redhat.com>
Diffstat (limited to 'install/tools')
-rwxr-xr-x | install/tools/ipa-replica-manage | 8 |
1 files changed, 7 insertions, 1 deletions
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: |