Bug 674039

Summary: global name 'sorted' is not defined
Product: Red Hat Enterprise MRG Reporter: Martin Kudlej <mkudlej>
Component: condor-wallaby-clientAssignee: Robert Rati <rrati>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Kudlej <mkudlej>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DevelopmentCC: iboverma, matt
Target Milestone: 1.3.2   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: condor-wallaby-client-3.9-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-15 13:02:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Kudlej 2011-01-31 12:21:37 UTC
Description of problem:
01/31 11:20:39 INFO: Starting Up
01/31 11:20:39 INFO: Hostname is ""
01/31 11:20:39 INFO: Cleaning up temporary configuration files
01/31 11:20:39 DEBUG: Deleting temporary configuration file /tmp/condor.old_configE7ceUw.tmp
01/31 11:20:39 DEBUG: "QMF_BROKER_AUTH_MECHANISM" is not defined. Using defaults
01/31 11:20:40 DEBUG: Writing configuration file to "/var/lib/condor/wallaby_node.config"
01/31 11:20:40 DEBUG: Connected to broker "10.34.37.168:5672"
01/31 11:20:40 DEBUG: Looking for the store agent
01/31 11:20:43 DEBUG: Established connection to the configuration store
01/31 11:20:44 DEBUG: Found the store agent
01/31 11:20:52 DEBUG: Checking version of configuration
01/31 11:20:52 DEBUG: Performing a checkin with the store
01/31 11:20:52 DEBUG: Checked in with the store
01/31 11:20:53 INFO: Retrieving configuration version "1296472426731908" from the store


01/31 11:20:54 ERROR: Failed to write configuration to temp file


01/31 11:32:32 DEBUG: Shutting down
01/31 11:32:32 DEBUG: Closing QMF connections
01/31 11:32:32 DEBUG: Lost connection to the configuration store
01/31 11:32:32 DEBUG: Closed QMF connections

I've found that configuration isn't save to temporary file because there raises exception: global name 'sorted' is not defined
Function sorted was introduced in Python 2.4 and there is python-2.3.4-14.7

http://docs.python.org/library/functions.html#sorted


Version-Release number of selected component (if applicable):
python-wallabyclient-3.9-2.el4
condor-job-hooks-1.4-6.el4
condor-debuginfo-7.4.5-0.7.el4
python-condorutils-1.4-6.el4
condor-wallaby-client-3.9-2.el4
condor-low-latency-1.1-2.el4
condor-7.4.5-0.7.el4
condor-qmf-7.4.5-0.7.el4

How reproducible:
100%

Steps to Reproduce:
1. set up something to node with RHEL 4.9
2. check ConfigLog on that node
  
Actual results:
Configuration doesn't propagate to RHEL 4 nodes.

Expected results:
Configuration will propagate to RHEL 4 nodes.

Additional info:
RHEL 4:
$ grep sorted `which condor_configd`
               for file in sorted(entries):
$  python
Python 2.3.4 (#1, Jul 16 2009, 07:01:37) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>  sorted([5, 2, 3, 1, 4])
  File "<stdin>", line 1
    sorted([5, 2, 3, 1, 4])
    ^
SyntaxError: invalid syntax

RHEL 5:
$ python
Python 2.4.3 (#1, Dec 10 2010, 17:24:35) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> sorted([5, 2, 3, 1, 4])
[1, 2, 3, 4, 5]

Comment 1 Robert Rati 2011-01-31 18:12:32 UTC
Removed usage of sorted and switched to list.sort.

Comment 3 Martin Kudlej 2011-02-01 12:44:29 UTC
Tested on RHEL 5.6/4.9 x i386/x86_64 with:
wallaby-0.10.4-2
condor-wallaby-tools-3.9-3
python-condorutils-1.4-6
condor-7.4.5-0.7
condor-job-hooks-1.4-6
wallaby-utils-0.10.4-2
condor-low-latency-1.1-2
condor-wallaby-client-3.9-3
condor-wallaby-base-db-1.5-2
ruby-wallaby-0.10.4-2
condor-qmf-7.4.5-0.7
python-wallabyclient-3.9-3

and it works. -->VERIFIED