Larry Martell
Larry Martell

Reputation: 3756

HTCondor Python API

I am trying to use the python API to submit jobs from a machine that does not have condor installed, and I am having a lot of trouble.

I did 'pip install htcondor' and when I import it I get:

>>> import htcondor

Neither the environment variable CONDOR_CONFIG,
/etc/condor/, /usr/local/etc/, nor ~condor/ contain a condor_config source.
Either set CONDOR_CONFIG to point to a valid config source,
or put a "condor_config" file in /etc/condor/ /usr/local/etc/ or ~condor/

What is the issue here? To use the API from a client machine like this do I have to have a full blown installed and configured condor? I wouldn't think that would be necessary.

Anyway I plodded on, and I tried this:

>>> coll = htcondor.Collector("192.168.10.2")
>>> ads = coll.query(htcondor.AdTypes.Startd)
12/17/17 13:12:36 ERROR "Unwilling or unable to try IPv4 or IPv6.
Check the settings ENABLE_IPV4, ENABLE_IPV6, and NETWORK_INTERFACE.
" at line 1212 in file
/var/lib/condor/execute/slot1/dir_5110/htcondor_source/src/condor_io/sock.cpp

What am I doing wrong here?

Upvotes: 1

Views: 466

Answers (1)

Larry Martell
Larry Martell

Reputation: 3756

I got around this by creating an empty file and pointing CONDOR_CONFIG to it, e.g.:

touch condor_config
export CONDOR_CONFIG=`pwd`/condor_config

Upvotes: 2

Related Questions