Project

General

Profile

Bug #6281

krbrefresh.sh failure on fifebatch1

Added by Dennis Box over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
05/15/2014
Due date:
% Done:

100%

Estimated time:
Spent time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

Hi Dennis,

Any idea why the krbrefresh.sh script produces the below error when it sees this job:

[rexbatch@fifebatch1 ~]$ condor_q -constraint 'Owner == "boyd"' -format "%s\n" accountinggroup
group_uboone.boyd

Note the error below has "AcctGroup='boone'". What happened to the "u".

Thanks,

joe

-------- Original Message --------
Subject: Cron <rexbatch@fifebatch1> /opt/jobsub/server/admin/krbrefresh.sh --refresh-proxies 10800 > /tmp/refresh-proxies.out
Date: Wed, 14 May 2014 14:22:05 -0500
From: Cron Daemon <>
To: <>

Traceback (most recent call last):
File "/opt/jobsub/server/webapp/auth.py", line 316, in <module>
refresh_proxies(sys.argv2)
File "/opt/jobsub/server/webapp/auth.py", line 242, in refresh_proxies
authorize(dn,user,grp,'Analysis',agelimit)
File "/opt/jobsub/server/webapp/auth.py", line 205, in authorize
raise AuthorizationError(dn, acctgroup)
main.AuthorizationError: Error authorizing DN='/DC=gov/DC=fnal/O=Fermilab/OU=Robots/CN=fifegrid/CN=batch/CN=Joe B. Boyd/CN=UID:boyd' for AcctGroup='boone'

History

#1 Updated by Dennis Box over 5 years ago

  • Status changed from New to Assigned
  • Target version set to v0.3
  • % Done changed from 0 to 80

I can reproduce the problem and can fix it but don't understand why its a problem in the first place. In the python code, line 240 of /opt/jobsub/server/webapp/auth.py there is this instruction:

grp=grp.strip("group_")

grp is originally pulled from condor classads and is either group_minos, group_uboone, group_nova, etc. This line is supposed to transform grp into minos, uboone, nova etc. The problem is it transforms group_uboone to boone. I can reproduce it in a python window so there is something going on with the string strip function I do not understand. Note that

grp=grp.replace("group_","")

works fine and I am replacing this line of code in v0.3.0 but I wish I understood what was happening.

Dennis

#2 Updated by Parag Mhashilkar over 5 years ago

strip is wrong call to use here. It strips chars present in 'group_' from the original string. In short is is character strip not string strip

>>> grp = 'group_grape'
>>> grp.strip('group_')
'ape'
>>> grp.lstrip('group_')
'ape'

#3 Updated by Dennis Box over 5 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 80 to 100

fixed by changing string.strip() call to string.replace()

#4 Updated by Parag Mhashilkar over 5 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF