Opened 9 years ago

Last modified 9 years ago

#281 assigned defect

global name 'cfgcluster' is not defined

Reported by: olahaye Owned by: ramonb
Priority: major Milestone: 1.2
Component: jobarchived Version: trunk
Keywords: Cc:
Estimated Number of Hours: 0

Description (last modified by olahaye)

If ARCHIVE_PATH does not exists, jobarchived crashes trying to create it.

Tue 25 Aug 2015 13:59:59 - Housekeeping: checking RRD archive for cluster DIGITEO Cluster (may take a while)..
Traceback (most recent call last):
  File "/usr/sbin/jobarchived", line 2398, in <module>
  File "/usr/sbin/jobarchived", line 2345, in main
  File "/usr/sbin/jobarchived", line 2303, in run
    myGangliaProcessors.append( GangliaXMLProcessor( myXMLSource, myDataStore, archive_cluster ) )
  File "/usr/sbin/jobarchived", line 1552, in __init__
    self.myXMLHandler = GangliaXMLHandler( self.config, self.ds, self.clusterName )
  File "/usr/sbin/jobarchived", line 1214, in __init__
  File "/usr/sbin/jobarchived", line 1235, in gatherCluster
    cluster_dir = '%s/%s' %( check_dir(ARCHIVE_PATH), cfgcluster )
NameError: global name 'cfgcluster' is not defined

Change History (3)

comment:1 Changed 9 years ago by olahaye

  • Description modified (diff)

comment:2 Changed 9 years ago by olahaye

Proposed solution (but I'm not sure as my python knwoledg is near zero). Please cross-check twice before applying.

Index: jobarchived/
--- jobarchived/  (révision 976)
+++ jobarchived/  (copie de travail)
@@ -1232,11 +1232,11 @@
                 # Autocreate a directory for this cluster
                 # assume it is new
-                cluster_dir = '%s/%s' %( check_dir(ARCHIVE_PATH), cfgcluster )
+                cluster_dir = '%s/%s' %( check_dir(ARCHIVE_PATH), self.clusterName )
                 os.mkdir( cluster_dir )
-                dirlist.append( cfgcluster )
+                dirlist.append( cluster_dir )
             for d in dirlist:

Last edited 9 years ago by olahaye (previous) (diff)

comment:3 Changed 9 years ago by ramonb

  • Owner changed from somebody to ramonb
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.