[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Python API



I want to use the API to start jobs and DAGs - don't I have to
interact with the collectorfor that, e.g.:

    coll = htcondor.Collector('bach')
    schedd_ad = coll.locate(htcondor.DaemonTypes.Schedd)
    schedd = htcondor.Schedd(schedd_ad)
    ad = classad.ClassAd()
       .
       .
       .
    id = schedd.submit(ad)

Can I do this from a remote machine? If not, the API is not that useful.


On Mon, Dec 18, 2017 at 9:26 AM, Weiming Shi <swmtrc@xxxxxxxxx> wrote:
> Hi Larry,
>
> I don't think so. I think you don't need to have your client machine
> configured if you just use those python API that does not need to interact
> with the collector. But you will still get the warning message when you try
> to import the htcondor module.
> I am also seeking a way to disable this message.
>
> On Sun, Dec 17, 2017 at 1:15 PM, Larry Martell <larry.martell@xxxxxxxxx>
> wrote:
>>
>> I am trying to use the python API from a machine that does not have
>> condor installed. I did 'pip install htcondor' and now I am trying
>> this:
>>
>> >>> 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/
>> >>> import classad
>> >>> 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
>>
>> To use the API from a client machine like this do I have to have a
>> full blown installed and configured condor?