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

Replace sets with lists, add manual deduplication logic #25

Merged

Conversation

mwestphall
Copy link
Contributor

@mwestphall mwestphall commented Nov 6, 2024

This change comes about to mitigate a bug in the generation of /etc/condor/UserToProjectMap.txt on ospool-aps which causes nondeterministic behavior in htcondor feature AssignAccountingGroup. The existing code base deduplicates lists of group IDs via python's set, which results in groups being written to the output file in arbitrary order. AssignAccountingGroup then takes the first output group and assigns it as a ClassAd attribute, resulting in a different group being selected each time the project map is regenerated. A longer term fix will be to mark a certain group as "primary" for each user so that it can consistently be placed at the beginning of the list. Note that dictionary iteration is not guaranteed to be ordered in Python < 3.7, so this fix will only work on EPs on EL9+

@mwestphall mwestphall requested a review from brianhlin November 6, 2024 22:46
Copy link
Member

@brianhlin brianhlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brianhlin brianhlin merged commit 80a0cd3 into opensciencegrid:master Nov 21, 2024
3 checks passed
@brianhlin
Copy link
Member

Created https://opensciencegrid.atlassian.net/browse/INF-2527 to track the deployment of this + longer term solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants