condor-git-config
condor-git-config is a Python library and executable designed to dynamically configure an HTCondor node from a Git repository. It functions as a hook within HTCondor's configuration system, allowing administrators to manage node configurations via version control. The library is currently at version 0.1.5 and appears to have an active, though infrequent, release cadence, with updates addressing specific operational improvements.
Common errors
-
fatal: bad config file line 1 in .git/config
cause The Git repository's internal `.git/config` file, which `condor-git-config` interacts with, has become corrupted or unreadable on the HTCondor node. This can happen due to disk errors, unexpected shutdowns, or manual tampering.fixInvestigate the `.git/config` file within the cloned repository on the affected node. If possible, try to correct the file's syntax or, as a last resort, delete and re-clone the repository used by `condor-git-config`. -
condor-git-config: error: unrecognized arguments
cause Arguments passed to `condor-git-config` within the HTCondor `include command` are being misinterpreted, often due to incorrect or unintended shell escaping, even though a shell is not invoked. This typically happens when users apply shell-like quoting.fixRemove any shell-specific quotes (single or double) and escape characters from the arguments in the HTCondor `include command`. Pass the arguments literally as `condor-git-config` expects them. -
fatal: repository 'https://git.mydomain.com/condor-repos/condor-configs.git' not found
cause The Git repository URL provided to `condor-git-config` is incorrect, the repository does not exist, or the HTCondor node lacks the necessary network access or authentication to reach the repository.fixVerify the Git repository URL is correct and accessible from the HTCondor node. Ensure proper network connectivity and that any required Git credentials (e.g., SSH keys, HTTPS tokens) are correctly configured for the user running `condor-git-config`.
Warnings
- breaking Version 0.1.5 introduced the `--ff-only` flag to the internal `git pull` command. This changes the behavior from potentially merging divergent branches to only allowing fast-forward updates. If the remote branch has diverged from the local copy, the pull will fail, requiring manual intervention or a different Git strategy. [cite: Changelog]
- gotcha Arguments passed to `condor-git-config` via HTCondor's `include command` syntax are passed directly to the program without invoking a shell. This means that shell-specific escapes and quotes (e.g., for spaces in arguments or special characters) should NOT be used in the HTCondor configuration file.
- gotcha By default, `condor-git-config` will only include top-level files ending in `.cfg` and will not recurse into sub-directories unless explicitly configured with regular expression patterns for inclusion/exclusion or recursion.
- gotcha Changes applied by `condor-git-config` to HTCondor configuration files typically require an HTCondor daemon reconfigure (`condor_reconfig`) or restart (`condor_restart`) to take effect. Simply updating the Git repository won't immediately update running daemons.
Install
-
pip install condor-git-config
Imports
- condor-git-config (executable)
This library is primarily intended as an executable to be invoked by HTCondor's configuration system, not as a Python module for direct 'import' in user scripts.
Quickstart
# This command would be placed in an HTCondor configuration file (e.g., condor_config.local) # It tells HTCondor to execute condor-git-config, which then fetches and applies configuration # from the specified Git repository. # The --ff-only flag was added in v0.1.5 for safer pulls. include command : condor-git-config https://github.com/your_org/your_condor_configs.git --ff-only