mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix upgrade (update_replica_config) in single master mode
Commit afc0d4b62d added an upgrade
step that add an attribute to a replica config entry. The entry
only exists after a replica has been added, so upgrade was broken
for standalone server. Catch and suppress the NotFound error.
Related to: https://pagure.io/freeipa/issue/7488
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
5041b13fc9
commit
7c8fd5630d
@@ -1642,7 +1642,11 @@ def update_replica_config(db_suffix):
|
||||
('cn', 'replica'), ('cn', db_suffix), ('cn', 'mapping tree'),
|
||||
('cn', 'config')
|
||||
)
|
||||
entry = api.Backend.ldap2.get_entry(dn)
|
||||
try:
|
||||
entry = api.Backend.ldap2.get_entry(dn)
|
||||
except ipalib.errors.NotFound:
|
||||
return # entry does not exist until a replica is installed
|
||||
|
||||
if 'nsds5replicareleasetimeout' not in entry:
|
||||
# See https://pagure.io/freeipa/issue/7488
|
||||
logger.info("Adding nsds5replicaReleaseTimeout=60 to %s", dn)
|
||||
|
||||
Reference in New Issue
Block a user