Project

General

Profile

Feature #21885

Support to run test and periodic scripts within Singularity

Added by Marco Mambelli about 2 years ago. Updated 6 months ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
Start date:
02/11/2019
Due date:
% Done:

0%

Estimated time:
Stakeholders:

OSG

Duration:

Description

Currently, the Glidein can run arbitrary user scripts:
- before starting condor (to test and setup the node)
- periodically to test the node or to monitor (startd cron jobs)

All these scripts run outside Singularity
Users writing the script can invoke Singularity on their own if they like it
Since 3.4.1 there is a library that makes this easier (singularity_lib.sh)

The next step (the goal of this ticket) is to allow VOs to do that with an option in the script description in the config file (like they do to say if a script is periodic or not)


Related issues

Related to GlideinWMS - Milestone #19515: Roadmap for Singularity supportNew03/27/2018

Related to GlideinWMS - Feature #24826: Add a mechanism to run custom scripts at the end of the Glidein executionClosed08/19/2020

Related to GlideinWMS - Milestone #25516: Reorganize scripts to consider time (when they run), priority (order), and type (type os the script)New02/15/2021

Blocks GlideinWMS - Feature #25096: Support to run periodic scripts within SingularityNew10/20/2020

Blocks GlideinWMS - Feature #25073: Allow VO scripts to run before the job (in Singularity if used)Assigned10/14/2020

History

#1 Updated by Marco Mambelli about 2 years ago

#2 Updated by Marco Mambelli almost 2 years ago

  • Assignee set to Marco Mambelli

#3 Updated by Marco Mambelli over 1 year ago

  • Target version changed from v3_5_1 to v3_6_1

#4 Updated by Marco Mambelli over 1 year ago

  • Target version changed from v3_6_1 to v3_6_2

#5 Updated by Marco Mambelli over 1 year ago

  • Target version changed from v3_6_2 to v3_6_3

#6 Updated by Marco Mambelli 8 months ago

  • Target version changed from v3_6_3 to v3_6_4

#7 Updated by Marco Mambelli 7 months ago

  • Target version changed from v3_6_4 to v3_6_5

#8 Updated by Marco Mambelli 7 months ago

  • Target version changed from v3_6_5 to v3_6_6

#9 Updated by Marco Mambelli 6 months ago

  • Priority changed from Normal to High
  • Status changed from New to Work in progress

#10 Updated by Marco Mambelli 6 months ago

  • Related to Feature #25073: Allow VO scripts to run before the job (in Singularity if used) added

#11 Updated by Marco Mambelli 6 months ago

  • Blocks Feature #25096: Support to run periodic scripts within Singularity added

#12 Updated by Marco Mambelli 6 months ago

  • Target version changed from v3_6_6 to v3_7_1
  • Assignee changed from Marco Mambelli to Dennis Box
  • Status changed from Work in progress to Feedback

Changes are in v37/21885
It was moved to the 3.7.x series because it introduces a new configuration attribute for the files: type, defaulting to an empty value. The solution should be compatible w/ older configurations and allow interactions of w/ older factories or frontends.
For the feature to work the Factory has to be w/ these changes and if the file definition is in the Frontend configuration, then also the Frontend has to have the changes.
Otherwise, the test script will run but not in singularity

This ticket allows running setup scripts in singularity, with an environment similar to the one of the job.

The running of periodic scripts in singularity has been moved to [#25096]:
- HTCondor may provide a mechanism to run startd_cron scripts in singularity
- the current mechanism (script re-invoking itself) may not work in startd_cron
It could actually work with little or no changes but should be verified, especially the function adding the script in the condor configuration and the ability to access the environment and the files.

This ticket started also the foundations for [#25073], by adding some definitions and an implicit pre-script from the refactoring of the default_singularity_job_wrapper.

#13 Updated by Marco Mambelli 6 months ago

  • Related to deleted (Feature #25073: Allow VO scripts to run before the job (in Singularity if used))

#14 Updated by Marco Mambelli 6 months ago

  • Blocks Feature #25073: Allow VO scripts to run before the job (in Singularity if used) added

#15 Updated by Marco Mambelli 6 months ago

  • Assignee changed from Dennis Box to Bruno Coimbra

Added a fixture file to fix the failing unit test. All OK now.

#16 Updated by Bruno Coimbra 6 months ago

  • Assignee changed from Bruno Coimbra to Marco Mambelli
  • Status changed from Feedback to Assigned

All looks good to me. Shellcheck recomends a few style changes.

singularity_wrapper.sh:

Shellcheck recomends using $(...) notation instead of legacy backticked `...`

#17 Updated by Marco Mambelli 6 months ago

  • Assignee changed from Marco Mambelli to Bruno Coimbra
  • Status changed from Assigned to Feedback

Major changes to v37/21885 please re-check

#18 Updated by Bruno Coimbra 6 months ago

  • Assignee changed from Bruno Coimbra to Marco Mambelli
  • Status changed from Feedback to Assigned

All looks good. It should be ready to merge.

#19 Updated by Marco Mambelli 6 months ago

  • Status changed from Assigned to Resolved

#20 Updated by Marco Mambelli 6 months ago

  • Related to Feature #24826: Add a mechanism to run custom scripts at the end of the Glidein execution added

#21 Updated by Marco Mambelli 2 months ago

  • Related to Milestone #25516: Reorganize scripts to consider time (when they run), priority (order), and type (type os the script) added

Also available in: Atom PDF