mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -06:00
Fail on topology disconnect/last role removal
Disconnecting topology/removing last-role-host during server uninstallation should raise error rather than just being logged if the appropriate ignore settings are not present. https://fedorahosted.org/freeipa/ticket/6168 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
6e6cbda036
commit
fea56fefff
@ -294,7 +294,6 @@ def common_cleanup(func):
|
||||
def remove_master_from_managed_topology(api_instance, options):
|
||||
try:
|
||||
# we may force the removal
|
||||
# if the master was already deleted we will just get a warning
|
||||
server_del_options = dict(
|
||||
force=True,
|
||||
ignore_topology_disconnect=options.ignore_topology_disconnect,
|
||||
@ -303,8 +302,10 @@ def remove_master_from_managed_topology(api_instance, options):
|
||||
|
||||
replication.run_server_del_as_cli(
|
||||
api_instance, api_instance.env.host, **server_del_options)
|
||||
|
||||
except errors.ServerRemovalError as e:
|
||||
raise ScriptError(str(e))
|
||||
except Exception as e:
|
||||
# if the master was already deleted we will just get a warning
|
||||
root_logger.warning("Failed to delete master: {}".format(e))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user