Use api.env.container_sysaccounts

Refactor code to use api.env.container_sysaccounts instead of
('cn', 'sysaccounts'), ('cn', 'etc')

Related: https://pagure.io/freeipa/issue/8276
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Christian Heimes
2020-04-17 11:19:16 +02:00
parent 24cc13db89
commit bb24641e8f
8 changed files with 19 additions and 15 deletions

View File

@@ -1010,8 +1010,9 @@ def promote_check(installer):
# Detect if the other master can handle replication managers
# cn=replication managers,cn=sysaccounts,cn=etc,$SUFFIX
dn = DN(('cn', 'replication managers'), ('cn', 'sysaccounts'),
('cn', 'etc'), ipautil.realm_to_suffix(config.realm_name))
dn = DN(('cn', 'replication managers'),
api.env.container_sysaccounts,
ipautil.realm_to_suffix(config.realm_name))
try:
conn.get_entry(dn)
except errors.NotFound: