Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport][ipa-4-6] Fix race condition in get_locations_records() #2124

Closed
wants to merge 1 commit into from

Conversation

Tiboris
Copy link
Member

@Tiboris Tiboris commented Jul 9, 2018

This PR was opened automatically because PR #2120 was pushed to master and backport to ipa-4-6 is required.

The method IPASystemRecords.get_locations_records() has a race condition.
The IPASystemRecords object creates a mapping of server names to server
data. get_locations_records() uses server_find() again to get a list of
servers, but then operates on the cached dict of server names.

In parallel replication case, the second server_find() call in
get_locations_records() can return additional servers. Since the rest of
the code operates on the cached data, the method then fails with a KeyError.

server_data is now an OrderedDict to keep same sorting as with
server_find().

Fixes: https://pagure.io/freeipa/issue/7566
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@Tiboris
Copy link
Member Author

Tiboris commented Jul 9, 2018

PR was ACKed automatically because this is backport of PR #2120. Wait for CI to finish before pushing. In case of questions or problems contact @tiran who is author of the original PR.

@Tiboris Tiboris added ack Pull Request approved, can be merged prioritized Pull Request has higher priority for PR-CI labels Jul 9, 2018
@tiran tiran added the pushed Pull Request has already been pushed label Jul 9, 2018
@tiran
Copy link
Member

tiran commented Jul 9, 2018

ipa-4-6:

  • 3679e6a Fix race condition in get_locations_records()

@tiran tiran closed this Jul 9, 2018
@Tiboris Tiboris deleted the backport_pr2120_ipa-4-6 branch July 2, 2019 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged prioritized Pull Request has higher priority for PR-CI pushed Pull Request has already been pushed
Projects
None yet
2 participants