Repository navigation
Add osg-htc/nrp-provisioner: the HTCondor provisioner for NRP Nautilus - #331
Open
ashtongraves wants to merge 6 commits into
Open
ashtongraves wants to merge 6 commits into
ashtongraves wants to merge 6 commits into
Conversation
The demand-driven provisioner that launches osg-htc/nrp-ospool-ep worker pods on the NRP Nautilus Kubernetes cluster for idle OSPool jobs. Moved here from github.com/ashtongraves/nrp-provisioner, whose provisioner/ directory is kept identical to this one; deployment configs stay there. Rocky 10, OSG 25, HTCondor 25 (htcondor2 bindings). Includes its README, unit tests and an image test (tests/image.sh). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Scheduling, resource accounting, and failure-isolation defects can stall provisioning, repeatedly create workers, or terminate running workloads.
5 open issues
Preserve GPU, disk, and label fields in demand cluster keys · New Prevent one worker failure from terminating sibling pods · New Omit empty node affinity to avoid matching no nodes · New Propagate background process failures from the worker script · New Use Ki units for HTCondor disk resource limits · New
What changed in this PR
Adds osg-htc/nrp-provisioner alongside its worker image, bringing demand-driven HTCondor worker provisioning for NRP Nautilus into this repository.
Changes:
- Adds the container build, credential setup, and runtime entry points.
- Implements demand queries, resource grouping, Kubernetes Job creation, trial pods, and back-off.
- Includes unit and image checks, configuration examples, operational documentation, and upstream licenses.
| File | Description |
|---|---|
osg-htc/nrp-provisioner/tests/test_schedd_query.py |
Tests schedd filtering, query constraints, and failures. |
osg-htc/nrp-provisioner/tests/test_logging.py |
Tests file logging and stdout mirroring. |
osg-htc/nrp-provisioner/tests/test_k8s_submit.py |
Checks Job submission and resource quantities. |
osg-htc/nrp-provisioner/tests/test_htcondor_ads.py |
Tests ad conversion and resource grouping. |
osg-htc/nrp-provisioner/tests/test_backoff.py |
Tests back-off, trial pods, and loop integration. |
osg-htc/nrp-provisioner/tests/sample_osg_provisioner.conf |
Supplies configuration for tests. |
osg-htc/nrp-provisioner/tests/image.sh |
Checks image dependencies, environment, and startup. |
osg-htc/nrp-provisioner/src/provisioner_logging.py |
Provides buffered file and stdout logging. |
osg-htc/nrp-provisioner/src/provisioner_k8s.py |
Configures, queries, and creates worker Jobs. |
osg-htc/nrp-provisioner/src/provisioner_htcondor.py |
Queries schedds and collector ads using htcondor2. |
osg-htc/nrp-provisioner/src/provisioner_config_parser.py |
Parses configuration values. |
osg-htc/nrp-provisioner/src/provisioner_clustering.py |
Groups demand and workers by resource shape. |
osg-htc/nrp-provisioner/src/provisioner_backoff.py |
Pauses provisioning after repeated unclaimed exits. |
osg-htc/nrp-provisioner/src/event_loop.py |
Coordinates queries, accounting, and provisioning. |
osg-htc/nrp-provisioner/src/__init__.py |
Marks the provisioner library package. |
osg-htc/nrp-provisioner/setup_k8s_creds.sh |
Preserves Kubernetes settings for the runtime user. |
osg-htc/nrp-provisioner/setup_htcondor_creds.sh |
Copies tokens and configures optional authentication. |
osg-htc/nrp-provisioner/README.md |
Documents operation, configuration, troubleshooting, and tests. |
osg-htc/nrp-provisioner/provisioner_startup.sh |
Prepares runtime settings and launches the provisioner. |
osg-htc/nrp-provisioner/provisioner_main.py |
Initializes clients and runs the provisioning loop. |
osg-htc/nrp-provisioner/provisioner_info.py |
Reports demand and worker counts by shape. |
osg-htc/nrp-provisioner/LICENSES/MIT-prp-osg-pool.txt |
Includes the upstream MIT license. |
osg-htc/nrp-provisioner/LICENSES/BSD-2-Clause-prp-htcondor-portal.txt |
Includes the upstream BSD license. |
osg-htc/nrp-provisioner/Dockerfile |
Builds the provisioner image and runtime environment. |
osg-htc/nrp-provisioner/build-config.json |
Registers the EL10/OSG 25 release build. |
osg-htc/nrp-provisioner/03_condor_sec.config |
Configures HTCondor to use OSG certificates. |
Review effort: Balanced
…void matching no nodes' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…failures from the worker script' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…k resource limits' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Jobs were grouped by RequestDiskVolumes, RequestGPUTypes and RequestLabels too, but submit() never puts those on the pods. A job setting one would get pods every loop that its group never counted, with no cap and no back-off. Group as if they were unset: trial pods and the back-off then limit the cost if such a job's pods don't match it. No job in the deployed namespaces sets them today. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pods Worker Jobs run several pods with backoffLimit 0, so one failed pod fails the whole Job and the Job controller deletes the others, claimed ones included. In osg-opportunistic, 17 such failures in an hour, all preemptions, deleted 141 sibling pods. Ignore pods stopped for preemption (DisruptionTarget) in a podFailurePolicy: the Job controller replaces them instead. Other failures still fail the Job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashtongraves
added a commit
to ashtongraves/nrp-provisioner
that referenced
this pull request
Oct 25, 2026
Same as opensciencegrid/images#331: ignore preemption (DisruptionTarget) in the worker Jobs' podFailurePolicy, so the Job controller replaces the pod instead of failing the Job and deleting its other pods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashtongraves
added a commit
to ashtongraves/nrp-provisioner
that referenced
this pull request
Oct 25, 2026
provisioner: sync with the review fixes in opensciencegrid/images#331
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What
New image
osg-htc/nrp-provisioner: the demand-driven HTCondor provisioner that launchesosg-htc/nrp-ospool-epworker pods on the NRP Nautilus Kubernetes cluster. One provisioner per namespace reads idle jobs from whitelisted schedds, groups them by resource shape, and creates Kubernetes Jobs whose pods join the OSPool (or IGWN) with one static slot each.It currently runs in four NRP namespaces (
osg-opportunistic,osg-icecube,osg-nrao,osg-ligo) from a personal registry project. Building it here puts it next to its worker image,osg-htc/nrp-ospool-ep.Contents
Dockerfile: Rocky 10, OSG 25, HTCondor 25 with thehtcondor2bindings, Python 3.12,kubernetesclient pinned at 37.0.1.src/: the provisioner library;provisioner_main.pyand the startup scripts.README.md: how it works, configuration, authentication, troubleshooting, building and tests.tests/: unit tests, an image test (tests/image.sh <image>) and a sample config.LICENSES/: the code comes from sfiligoi/prp-osg-pool (MIT) and the prp-htcondor-portal provisioner (BSD-2-Clause), and keeps those copyright headers.Notes
build-config.jsonisel10/ OSG25/release, so CI publishesnrp-provisioner:25-release. The Dockerfile installs OSG 25 on Rocky 10 itself and doesn't use theBASE_*build arguments, so Docker may warn that they're unused.tests/image.shpasses (32 unit tests inside the image; startup with a fake service account reaches the provisioning loop and reads the OSPool collector and a schedd).provisioner/directory is kept identical to this one (changes land here first).🤖 Generated with Claude Code