Skip to content

Commit

Permalink
Merge pull request #577 from brianhlin/allow-fs-only-submission
Browse files Browse the repository at this point in the history
Add the ability to attempt submission without a credential (HTCONDOR-1787)
  • Loading branch information
timtheisen committed Sep 13, 2023
2 parents 9cc3238 + 74501f1 commit c9d972c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/condor_ce_trace
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def parse_opts():
dest="schedd_name")
parser.add_option("-d", "--debug", help="Print debugging info.",
dest="debug", default=False, action="store_true")
parser.add_option("--skip-scitokens", help="Skip SCITOKENS authentication.",
dest="skip_scitokens", default=False, action="store_true")
parser.add_option("-a", "--attribute", help="Add attribute to job ad.",
dest="attribute", default=[], action='append')
parser.add_option("-n", "--no-clean", help="Do not clean temporary "
Expand Down Expand Up @@ -196,7 +198,7 @@ def setup_user_creds():
return results


def check_job_submit(job_info, schedd_ad):
def check_job_submit(job_info, schedd_ad, setup_creds=True):

job_ad = classad.ClassAd()
job_ad["Cmd"] = '/usr/bin/env'
Expand All @@ -211,7 +213,8 @@ def check_job_submit(job_info, schedd_ad):
# Accept submit format '+AttributeName'
job_ad[key.lstrip('+').strip()] = set_classad_value_type(value.strip())

job_ad.update(setup_user_creds())
if setup_creds:
job_ad.update(setup_user_creds())

if G_DEBUG:
print(f"Job ad, pre-submit:\n{job_ad}")
Expand Down Expand Up @@ -333,7 +336,7 @@ def main():
check_authz(coll_ad, schedd_ad)
try:
job_info.update(ce.generate_job_files())
check_job_submit(job_info, schedd_ad)
check_job_submit(job_info, schedd_ad, setup_creds=not opts.skip_scitokens)
finally:
if opts.clean:
ce.cleanup_job_files(job_info)
Expand Down

0 comments on commit c9d972c

Please sign in to comment.