diff options
| -rw-r--r-- | ipaserver/install/server/replicainstall.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 4f239aacd..97f19c7fd 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -975,6 +975,20 @@ def promote_check(installer): replman = ReplicationManager(config.realm_name, config.master_host_name, None) + # Detect the current domain level + try: + current = remote_api.Command['domainlevel_get']()['result'] + except errors.NotFound: + # If we're joining an older master, domain entry is not + # available + current = constants.DOMAIN_LEVEL_0 + + if current == constants.DOMAIN_LEVEL_0: + raise RuntimeError( + "You must provide a file generated by ipa-replica-prepare to " + "create a replica when the domain is at level 0." + ) + # Check authorization result = remote_api.Command['hostgroup_find']( cn=u'ipaservers', @@ -1029,20 +1043,6 @@ def promote_check(installer): config.host_name) sys.exit(3) - # Detect the current domain level - try: - current = remote_api.Command['domainlevel_get']()['result'] - except errors.NotFound: - # If we're joining an older master, domain entry is not - # available - current = constants.DOMAIN_LEVEL_0 - - if current == constants.DOMAIN_LEVEL_0: - raise RuntimeError( - "You must provide a file generated by ipa-replica-prepare to " - "create a replica when the domain is at level 0." - ) - # Detect if current level is out of supported range # for this IPA version under_lower_bound = current < constants.MIN_DOMAIN_LEVEL |
