Sitelet https://github.com/OSC/ood_core/pull/994
Skip to content

fix build_systemd to use site_timeout - #994

Open
Oglopf wants to merge 1 commit into
masterfrom
fix-systemd-site-timeout
Open

Oglopf wants to merge 1 commit into
masterfrom
fix-systemd-site-timeout

Conversation

@Oglopf

@Oglopf Oglopf commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

build_systemd read max_timeout from the cluster config and passed it to
Launcher.new as max_timeout:, but the launcher's constructor accepts site_timeout:.
The unrecognized keyword was absorbed by **_, so @site_timeout was always nil.to_i,
i.e. 0.

script_timeout treats 0 as "no site limit configured", so it returned 'infinity' and
the site's timeout was never applied to any job.

build_systemd now reads site_timeout and falls back to max_timeout, passing it under
the name the launcher actually accepts.

max_timeout is still accepted because that is the name currently documented in
systemd.rst and the one sites have in their cluster configs today. A straight rename
would have silently stopped reading their existing configuration.

Related issue

Closes #912

Testing

  • Tests included
  • No tests needed — reason: ___

Four tests in systemd_test.rb: site_timeout reaches the launcher, max_timeout still
works, site_timeout wins when both are set, and an unset timeout is still 0.

The first three fail against master with Expected: 5678, Actual: 0, matching the debug
output in the issue.

Checklist

  • Follows project code style and conventions
  • Documentation provided (if new feature, adapter or behavior change) — see note below
  • This is a large feature and was discussed in an issue first (if applicable) — N/A

Anything else?

Worth a release note. Sites that set max_timeout on a systemd cluster have had it
silently ignored. After this, their configured timeout starts being enforced — jobs that
previously ran without a site limit may begin hitting one. That is the intended behavior,
but it is a change those sites will notice.

Docs need a matching update in OSC/ood-documentation. systemd.rst currently mentions
timeout in prose and site_timeout in the example config, and neither matches the code
today. Not changed here since it's a separate repo.

linux_host has the same mismatch — build_linux_host passes max_timeout: to a launcher
that accepts site_timeout:. Filed separately rather in #995 than widening this PR.

This branch has not been deployed

No deployments
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.

Fix bug in 'systemd' adapter timeout-related configuration code

1 participant