Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] python bindings/bdii problem
- Date: Thu, 10 Jan 2019 16:37:22 +0000
- From: Brian Lin <blin@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] python bindings/bdii problem
Hi Stephen,
The CE collector/schedd (presumably the one on 9619) should have very
open ALLOW_READ policies by default. I would set `COLLECTOR_DEBUG =
D_CAT D_ALWAYS:2 D_SECURITY` and that should tell us more about why auth
is failing.
Thanks,
Brian
On 1/10/19 8:21 AM, Stephen Jones wrote:
> 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()
>