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

Re: [HTCondor-users] condor_check_config Python error



Hi Thomas,

Indeed, there is a clear bug where if ALLOW_WRITE_COLLECTOR is not set in the config, condor_check_config will trip on an undefined variable. I've made a ticket and supplied a fix https://opensciencegrid.atlassian.net/browse/HTCONDOR-1186, but it might be a couple releases out until it gets included since we just hit a code freeze last week.

A quick fix is to add a line defining "allow_write" as an empty string at line 59 in condor_check_config:

diff --git a/src/condor_scripts/condor_check_config b/src/condor_scripts/condor_check_config
index b3bdf2a1df..7fe526d49f 100755
--- a/src/condor_scripts/condor_check_config
+++ b/src/condor_scripts/condor_check_config
@@ -56,6 +56,7 @@ def check_dead_allow_write():
     """
     Look for extraneous ALLOW_WRITE_<daemon>
     """
+    allow_write = ''
     if 'ALLOW_WRITE_COLLECTOR' in htcondor.param : allow_write = 'ALLOW_WRITE_COLLECTOR '
     if 'ALLOW_WRITE_STARTD' in htcondor.param : allow_write += 'ALLOW_WRITE_STARTD '

Jason Patton

On 6/23/22 10:20 AM, Thomas Birkett - STFC UKRI via HTCondor-users wrote:

Hi all,

 

Hopefully a quick fix but Iâm testing out Condor 9.0.13 in our test environment and went to test out the new condor_check_config command but unfortunately got a rather interesting Python error on our schedd machine. Has anyone seen this kind of error before?

 

Âcondor_check_config

Traceback (most recent call last):

  File "/usr/bin/condor_check_config", line 92, in <module>

    main()

  File "/usr/bin/condor_check_config", line 84, in main

    message = check_dead_allow_write()

  File "/usr/bin/condor_check_config", line 62, in check_dead_allow_write

    if len(allow_write) :

UnboundLocalError: local variable 'allow_write' referenced before assignment

 

Many thanks,

 

Thomas Birkett

Senior Systems Administrator

Scientific Computing Department  

Science and Technology Facilities Council (STFC)

Rutherford Appleton Laboratory, Chilton, Didcot 
OX11 0QX

 

signature_609518872

 

 

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. 


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/