Skip to content

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

Merged
tcjennings merged 2 commits into
mainfrom
tickets/DM-55434
Jul 15, 2026
Merged

DM-55434: BPS Provisioner Service Job May End Before finalJob#94
tcjennings merged 2 commits 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.79%. Comparing base (8e7ef64) to head (6a2bf6f).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   84.78%   84.79%   +0.01%     
==========================================
  Files          19       19              
  Lines        4260     4263       +3     
  Branches      458      458              
==========================================
+ Hits         3612     3615       +3     
  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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It'd be good hygiene. Worst case there's a zombie sleep that lives for a time, best case htcondor signals the progress group.

@mxk62 mxk62 changed the title DM-55434 : Harden default provisioningScript DM-55434: BPS Provisioner Service Job May End Before finalJob Jul 14, 2026
- parameterize `provisioningMaxConsecutiveFailures` and `provisioningShutdownAllowanceSeconds`
- ensure background sleep is signalled in trap handler
- update `userguide.rst`
@tcjennings
tcjennings merged commit 6f19d5e into main Jul 15, 2026
19 checks passed
@tcjennings
tcjennings deleted the tickets/DM-55434 branch July 15, 2026 17:15
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