mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-13 09:41:55 -06:00
Use same means of checking replication agreements on both DLs
https://fedorahosted.org/freeipa/ticket/6392 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
parent
bc2e3386e7
commit
37578cfc2b
@ -1128,20 +1128,13 @@ def promote_check(installer):
|
|||||||
promotion_check_ipa_domain(conn, remote_api.env.basedn)
|
promotion_check_ipa_domain(conn, remote_api.env.basedn)
|
||||||
|
|
||||||
# Check that we don't already have a replication agreement
|
# Check that we don't already have a replication agreement
|
||||||
try:
|
if replman.get_replication_agreement(config.host_name):
|
||||||
_acn, adn = replman.agreement_dn(config.host_name)
|
msg = ("A replication agreement for this host already exists. "
|
||||||
conn.get_entry(adn, ['*'])
|
"It needs to be removed.\n"
|
||||||
except errors.NotFound:
|
"Run this command:\n"
|
||||||
pass
|
" %% ipa-replica-manage del {host} --force"
|
||||||
else:
|
.format(host=config.host_name))
|
||||||
root_logger.info('Error: A replication agreement for this '
|
raise ScriptError(msg, rval=3)
|
||||||
'host already exists.')
|
|
||||||
print('A replication agreement for this host already exists. '
|
|
||||||
'It needs to be removed.')
|
|
||||||
print("Run this command:")
|
|
||||||
print(" %% ipa-replica-manage del %s --force" %
|
|
||||||
config.host_name)
|
|
||||||
raise ScriptError(rval=3)
|
|
||||||
|
|
||||||
# Detect if current level is out of supported range
|
# Detect if current level is out of supported range
|
||||||
# for this IPA version
|
# for this IPA version
|
||||||
|
Loading…
Reference in New Issue
Block a user