check SUBMIT_REQUIREMENTS for factory submissions

Description

SUBMIT_REQUIREMENTS currently are not applied to factory submissions. A factory can be submitted successfully, and then have all job materialization fail because of submit requirements. This is particularly bad because a job factory with no materialized jobs is not visible in the normal output of condor_q.

The difficulty with applying SUBMIT_REQUIREMENTS to factory submissions is that until a job is materialized, there is a Cluster classad, but no Proc classad, and it it may not be possible to apply JOB_TRANSFORMS to the cluster classad, or doing so may give incorrect results (unlikely but possible).

On possible solution would be to a different set of SUBMIT_REQUIREMENTS for factory submissions. Or perhaps split SUBMIT_REQUIREMENTS into pre and post job transform lists, and attempt only the pre transform requirements for factories. but we have rejected this approach as it would confusing to users.

Scope of work

We will fix this by applying JOB_TRANSFORMs and SUBMIT_REQUIREMENTS to the cluster ad at the time of the factory submission. This will happen inside the schedd while it is committing the transaction. This must happen after the factory has stuffed factory attributes such as the materialization limit, so that a SUBMIT_REQUIREMENT can refer to that and apply constraints on the materialization.

The steps for this operation will be

  1. set factory attributes JobMaterializeDigestFile , JobMaterializeLimit and JobMaterializeMaxIdle, to correct values (this happens now)

  2. create a temporary Proc0 ad and chain it to the Cluster ad

  3. apply JOB_TRANSFORMs to the temporary Proc0 ad

  4. check SUBMIT_REQUIREMENTS against the temporary Proc0 and fail the transaction if any requirement does not succeed

  5. apply changes in the temporary Proc0 ad back to the Cluster ad

  6. finish committing the submit transaction for the factory and queue materialization (this happens now)

Activity

John (TJ) Knoeller October 12, 2021 at 8:38 PM
Edited

version history here in case of conflicts

  • JOB_TRANSFORM_* and SUBMIT_REQUIREMENT_* operations in the condor_schedd
    are now applied to late materialization job factories at submit time.
    :jira:756

Fixed

Details

Time tracking

8.5h logged

Assignee

Fix versions

Priority

HTCondorCustomerGroup

condor-users

Reporter

Created September 28, 2021 at 4:50 PM
Updated October 7, 2022 at 7:00 PM
Resolved October 22, 2021 at 2:03 PM