mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
server-del do not return early if CA renewal master cannot be changed
Early return prevented adding last warning message in the method: "Ignoring these warnings and proceeding with removal" And thus `check_master_removal` in `test_server_del` did not work. https://pagure.io/freeipa/issue/7517 Signed-off-by: Petr Vobornik <pvoborni@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
parent
8328a555ae
commit
7c5ee4e8fc
@ -523,16 +523,13 @@ class server_del(LDAPDelete):
|
||||
"leave your installation without a CA."),
|
||||
ignore_last_of_role)
|
||||
|
||||
# change the renewal master if there is other master with CA
|
||||
if ca_renewal_master == hostname:
|
||||
other_cas = [ca for ca in ca_servers if ca != hostname]
|
||||
|
||||
# if this is the last CA there is no other server to become
|
||||
# renewal master
|
||||
if not other_cas:
|
||||
return
|
||||
|
||||
self.api.Command.config_mod(
|
||||
ca_renewal_master_server=other_cas[0])
|
||||
if other_cas:
|
||||
self.api.Command.config_mod(
|
||||
ca_renewal_master_server=other_cas[0])
|
||||
|
||||
if ignore_last_of_role:
|
||||
self.add_message(
|
||||
|
Loading…
Reference in New Issue
Block a user