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

[HTCondor-users] python bindings/bdii problem



Hi all,

I have a HTCondor-CE <-> HTCondor setup.

CERN have devised a BDII program for HTCondor-CE. A piece of it is below, that I use for testing.The BDII program gets the Collector (the one on 9618, by default not the CE one), uses it to get info on the HTCondor-CE system, and then constructs another Collector by using the default HTCondor-CE port (9619). Then it tries to query the HTCondor-CE 9619 port Collector to get some facts to publish in the BDII.

Anyway, when I run it, I get an unhandled exception, IOError. I also see a message in the /var/log/condor-ce/CollectorLog file:

01/10/19 13:50:19 DC_AUTHENTICATE: required authentication of 138.253.178.106 failed: AUTHENTICATE:1003:Failed to authenticate with any method

So I guess I either need to make the python binding BDII program "authenticate" somehow, or make the Collector on the 9619 port not care.

I've tried some things to make that work but it hasn't so far.

Anybody got any tips on the right thing to do?

Cheers,

Ste

--- THAT PIECE ----

import sys
import htcondor

def main():

ÂÂÂ coll = htcondor.Collector()
ÂÂÂ coll_ad = coll.query(htcondor.AdTypes.Collector)[0]Â # the pool collector ad

ÂÂÂ ce_batch_schedd_ads = coll.query(htcondor.AdTypes.Schedd, 'HAS_HTCONDOR_CE =?= True', ['Machine'])

ÂÂÂ for ce_batch_schedd_ad in ce_batch_schedd_ads:

ÂÂÂÂÂÂÂ ce_host = ce_batch_schedd_ad['Machine']
ÂÂÂÂÂÂÂ ce_collector = htcondor.Collector(ce_host + ':9619')Â # find the CE using the default CE port
ÂÂÂÂÂÂÂ print ce_collector

ÂÂÂÂÂÂÂ try:
ÂÂÂÂÂÂÂÂÂÂÂ ce_schedd_ad = ce_collector.query(htcondor.AdTypes.Schedd, 'Name =?= "{0}"'.format(ce_host))[0]

ÂÂÂÂÂÂÂ except RuntimeError:
ÂÂÂÂÂÂÂÂÂÂÂ sys.stderr.write("Unable to locate CE schedd on %s" % ce_host)
ÂÂÂÂÂÂÂÂÂÂÂ continue

if __name__ == '__main__':
ÂÂÂ main()

--
Steve Jones                             sjones@xxxxxxxxxxxxxxxx
Grid System Administrator               office: 220
High Energy Physics Division            tel (int): 43396
Oliver Lodge Laboratory                 tel (ext): +44 (0)151 794 3396
University of Liverpool                 http://www.liv.ac.uk/physics/hep/