mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-24 22:27:41 -05:00
Avoid race condition caused by profile delete and recreate
When importing IPA-managed certificate profiles into Dogtag, profiles with the same name (usually caIPAserviceCert) are removed, then immediately recreated with the new profile data. This causes a race condition - Dogtag's LDAPProfileSystem profileChangeMonitor thread could observe and process the deletion after the profile was recreated, disappearing it again. Update the profile instead of deleting and recreating it to avoid this race condition. Fixes: https://fedorahosted.org/freeipa/ticket/5269 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
1 parent
2be8d2d068
commit
5136cd6e4b
1 file changed
+1
-2
@@ -1970,8 +1970,7 @@ def _create_dogtag_profile(profile_id, profile_data):
|
||||
root_logger.debug(
|
||||
"Failed to disable profile '%s' "
|
||||
"(it is probably already disabled)")
|
||||
profile_api.delete_profile(profile_id)
|
||||
profile_api.create_profile(profile_data)
|
||||
profile_api.update_profile(profile_id, profile_data)
|
||||
|
||||
# enable the profile
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user