Repository navigation
Conversation
Starts condor_master with collector, negotiator, schedd, startd, credd and af-credmon as CREDMON_OAUTH from a private CONDOR_CONFIG, stores top tokens for two kinds the way the broker does (as a CRED_SUPER_USERS identity on the submitter's behalf), submits a job with use_oauth_services and checks its stdout shows the redeemed credentials in $_CONDOR_CREDS. The credmon interval is an hour, so the redeems prove credd's SIGHUP to the pid in <creddir>/pid reaches af-credmon. Only the broker is a local HTTP stand-in. The pool runs as root, as in production; the test skips without condor_master, root, or SUDO_USER. Assisted-by: Claude (Anthropic)
Installs HTCondor with the official get.htcondor.org script, stops the system pool it starts (the test runs its own from a private CONDOR_CONFIG), and runs the test as root via sudo so SUDO_USER is the job's submitter. The step fails unless the test passed: a skip would mean nothing was tested. Assisted-by: Claude (Anthropic)
The first CI run failed at this assertion with nothing to diagnose from. Assisted-by: Claude (Anthropic)
condor_master failed to start af-credmon with errno 13: the pixi env is under the runner's home directory, which the condor user cannot traverse. Assisted-by: Claude (Anthropic)
kratsg
marked this pull request as ready for review
October 8, 2026 17:12
Collaborator
Author
|
@bbockelm this is the end-to-end test you suggested: a personal HTCondor pool with credd and af-credmon as |
… the e2e test The e2e test showed three things the access-point setup needs that the README did not say: the OAuth credential directory must be root:condor 2770 (as HTCondor's RPMs create it) or credd cannot create per-user subdirectories; condor_master must be able to reach the af-credmon executable as the condor user; and storing on a user's behalf takes -u <user>@<UID_DOMAIN> from a CRED_SUPER_USERS identity. Assisted-by: Claude (Anthropic)
This branch has not been deployed
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.
Adds an end-to-end test that runs af-credmon inside a real HTCondor pool, as suggested by @bbockelm when looking at the README.
What it does
tests/test_e2e_htcondor.pystartscondor_masterfrom a privateCONDOR_CONFIG(free collector port, no shared port) with collector, negotiator, schedd, startd, credd and af-credmon asCREDMON_OAUTH, then:af_servicexandaf_krb5top tokens withcondor_store_cred add-oauth -u <user>@<domain>as a separate account listed inCRED_SUPER_USERS, the way the broker stores them on users' behalf..usefiles.use_oauth_services = af_servicex, af_krb5and checks its stdout shows both credentials in$_CONDOR_CREDS.Only the broker is a stand-in (a local HTTP server serving
POST /v1/credentials/<kind>/redeem); everything HTCondor does is real.The questions it answers
<SEC_CREDENTIAL_DIRECTORY_OAUTH>/pid. The test runs af-credmon with--interval 3600, so the redeems (which land about 0.1s after credd writes each.top) can only come from that SIGHUP. It also checks the pid in that file is af-credmon.af_*). The test doesn't cover running alongside another credmon.Running it
It needs an installed HTCondor and root (credd and the shadow check that
.usefiles are root-owned), and submits as the user who invoked sudo:sudo env "PATH=$(pixi run -e py313 printenv PATH)" pytest tests/test_e2e_htcondor.pyIt skips without
condor_master, root orSUDO_USER, so the existing matrix (and macOS, where conda-forge'shtcondoris client-only) is unaffected. A newe2eCI job on ubuntu-latest installs HTCondor viaget.htcondor.org, runs it, and fails unless the test actually passed.On Ubuntu 24.04 with HTCondor 25.14.1 it takes 8–13s including the ~3s pool startup (11.7s in CI).
Things found along the way
The first, second and fourth are now documented in the README's HTCondor configuration section.
root:condormode2770; with0700 rootcredd fails withError 13, attempting to create OAuth cred subdir.condor_store_cred -urequiresuser@domain.condor, so root can't stand in for aCRED_SUPER_USERSidentity.condoruser to reach the credmon executable: with the pixi env under a0750home directory it fails withCannot execute (errno=13, Permission denied)and retries forever. A world-readable install location like/opt/af-credmon(as the README suggests) is fine; the CI job doeschmod o+x $HOME.🤖 Generated with Claude Code