mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
upgrade: treat duplicate entry when updating as not an error
When we attempt to update an entry during upgrade, it may have already contain the data in question between the check and the update. Ignore the change in this case and record it in the log. Fixes: https://pagure.io/freeipa/issue/7450 Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
parent
7c8fd5630d
commit
e16ea525e2
@ -21,6 +21,7 @@
|
||||
|
||||
# TODO
|
||||
# save undo files?
|
||||
from __future__ import absolute_import
|
||||
|
||||
import base64
|
||||
import logging
|
||||
@ -849,6 +850,9 @@ class LDAPUpdate(object):
|
||||
except errors.DatabaseError as e:
|
||||
logger.error("Update failed: %s", e)
|
||||
updated = False
|
||||
except errors.DuplicateEntry as e:
|
||||
logger.debug("Update already exists, skip it: %s", e)
|
||||
updated = False
|
||||
except errors.ACIError as e:
|
||||
logger.error("Update failed: %s", e)
|
||||
updated = False
|
||||
|
Loading…
Reference in New Issue
Block a user