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>
This commit is contained in:
Gabe
2015-11-08 17:18:17 -07:00
committed by Martin Basti
parent ab58ec0d50
commit efe8f26ddf

View File

@@ -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: