Skip to content

Commit

Permalink
make sure classAds for matching are ORDERED lists, fix #7043 (#7044)
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte authored Feb 3, 2022
1 parent 8e62371 commit 865b020
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/python/TaskWorker/Actions/PreJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import CMSGroupMapper


class PreJob:
"""
Need a doc string here.
Expand Down Expand Up @@ -434,12 +433,16 @@ def redo_sites(self, new_submit_text, crab_retry, use_resubmit_info):
self.logger.error("Can not submit since DESIRED_Sites list is empty")
self.prejob_exit_code = 1
sys.exit(self.prejob_exit_code)
## Make sure that attributest which will be used in MatchMaking are SORTED lists
available = list(available)
available.sort()
datasites = list(datasites)
datasites.sort()
## Add DESIRED_SITES to the Job.<job_id>.submit content.
new_submit_text = '+DESIRED_SITES="%s"\n%s' % (",".join(available), new_submit_text)
new_submit_text = '+DESIRED_CMSDataLocations="%s"\n%s' % (",".join(datasites), new_submit_text)
return new_submit_text


def touch_logs(self, crab_retry):
"""
Use the log web-shared directory created by AdjustSites.py for the task and create the
Expand Down

0 comments on commit 865b020

Please sign in to comment.