mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
replicainstall: Make sure that domain fulfills minimal domain level requirement
The old domain level check to suggest to use ipa-replica-prepare has been converted to make sure that domain fulfills minimal domain level requirement (no DL0). See: https://pagure.io/freeipa/issue/7669 Signed-off-by: Thomas Woerner <twoerner@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
parent
94159bbe13
commit
cb7f6b7be2
@ -1153,13 +1153,17 @@ def promote_check(installer):
|
||||
|
||||
promotion_check_ipa_domain(conn, remote_api.env.basedn)
|
||||
|
||||
# Make sure that domain fulfills minimal domain level
|
||||
# requirement
|
||||
domain_level = current_domain_level(remote_api)
|
||||
check_domain_level_is_supported(domain_level)
|
||||
if domain_level < constants.DOMAIN_LEVEL_1:
|
||||
if domain_level < constants.MIN_DOMAIN_LEVEL:
|
||||
raise RuntimeError(
|
||||
"You must provide a file generated by ipa-replica-prepare to "
|
||||
"create a replica when the domain is at level 0."
|
||||
)
|
||||
"Cannot promote this client to a replica. The domain level "
|
||||
"must be raised to {mindomainlevel} before the replica can be "
|
||||
"installed".format(
|
||||
mindomainlevel=constants.MIN_DOMAIN_LEVEL
|
||||
))
|
||||
|
||||
# Check authorization
|
||||
result = remote_api.Command['hostgroup_find'](
|
||||
|
Loading…
Reference in New Issue
Block a user