Skip to content

DM-55434: BPS Provisioner Service Job May End Before finalJob#94

Open
tcjennings wants to merge 1 commit into
mainfrom
tickets/DM-55434
Open

DM-55434: BPS Provisioner Service Job May End Before finalJob#94
tcjennings wants to merge 1 commit into
mainfrom
tickets/DM-55434

Conversation

@tcjennings

@tcjennings tcjennings commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Updates default provisioningScript to handle SIGTERM correctly and complete a final provisioning attempt at shutdown.

Script tries to stay alive until 10 consecutive provisioning failures.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@tcjennings tcjennings changed the base branch from main to u/tobyj/check_job_nodeset July 10, 2026 20:24
@tcjennings tcjennings changed the base branch from u/tobyj/check_job_nodeset to main July 10, 2026 20:27
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.78%. Comparing base (8e7ef64) to head (adabde5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage   84.78%   84.78%           
=======================================
  Files          19       19           
  Lines        4260     4260           
  Branches      458      458           
=======================================
  Hits         3612     3612           
  Misses        570      570           
  Partials       78       78           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

- trap SIGTERM in script and perform one final provisioner loop
- keep provisionerJob alive until N consecutive allocateNodes failures
@tcjennings tcjennings marked this pull request as ready for review July 13, 2026 15:09
@tcjennings tcjennings requested a review from mxk62 July 13, 2026 15:09

@mxk62 mxk62 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The changes looks fine. However, please do not forget to update package documentation! The default settings in lines 429 - 453 of doc/lsst.ctrl.bps.htcondor/userguide.rst must reflect any changes you'll make.


allocating=1
failures=0
max_failures=10

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd think it would be better to let max_failure be a tunable parameter by introducing provisioningMaxFailures setting.

wait $! || :
done
echo "$(date -u): Shutting down provisioningJob..."
sleep 20

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Again, it would be preferable to let the user adjust this value if needed. Can we use something like provisioningShutdownWaitTime to make it tunable?

{provisioningExtraOptions} \
'{provisioningPlatform}')

trap "allocating=0" SIGTERM

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't we need to kill the background sleep when handling the signal too?

@mxk62 mxk62 changed the title DM-55434 : Harden default provisioningScript DM-55434: BPS Provisioner Service Job May End Before finalJob Jul 14, 2026
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