Skip to content

Commit

Permalink
properly working stale handle detection
Browse files Browse the repository at this point in the history
release hltd 1.6.2-2 and fffmeta 1.6.2-0
  • Loading branch information
smorovic committed Mar 5, 2015
1 parent d381173 commit e19ef6b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/elasticbu.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def elasticize_box(self,infile):
#only here
document['host']=basename
try:
document['detectedStaleHandle']=bool(document['detectedStaleHandle'])
document['detectedStaleHandle']=bool(document['detectedStaleHandle']=='True')
except:
pass
self.index_documents('boxinfo',[document])
Expand Down
8 changes: 4 additions & 4 deletions python/hltd.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def run(self):
mpstat = os.stat(disk)
#no issue if we reached this point
fu_stale_counter = 0
except IOError as ex:
except (IOError,OSError) as ex:
#TODO:which kind of error is thrown with unresponsive Force10 network
if ex.errno == 116:
if fu_stale_counter==0 or fu_stale_counter%20==0:
Expand Down Expand Up @@ -587,10 +587,10 @@ def run(self):
numQueuedLumis,maxCMSSWLumi=self.getLumiQueueStat()
fp.write('activeRunNumQueuedLS='+numQueuedLumis+'\n')
fp.write('activeRunCMSSWMaxLS='+maxCMSSWLumi+'\n')
fp.write('detectedStaleHandle='+str(fu_stale_counter>0))
fp.write('detectedStaleHandle='+str(fu_stale_counter>0)+'\n')
fp.write('entriesComplete=True')
boxinfo_update_attempts=0
except IOError as ex:
except (IOError,OSError) as ex:
logger.warning('boxinfo file write failed :'+str(ex))
#detecting stale file handle on recreated loop fs and remount
if conf.instance!='main' and (ex.errno==116 or ex.errno==2) and boxinfo_update_attempts>=5:
Expand All @@ -602,7 +602,7 @@ def run(self):
time.sleep(1)
boxinfo_update_attempts+=1
except Exception as ex:
logger.warning('boxinfo file write failed +'+str(ex))
logger.warning('exception on boxinfo file write failed : +'+str(ex))

if conf.role == 'bu':
#ramdisk = os.statvfs(conf.watch_directory)
Expand Down
2 changes: 1 addition & 1 deletion scripts/hltdrpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ cd $TOPDIR
cat > hltd.spec <<EOF
Name: hltd
Version: 1.6.2
Release: 1
Release: 2
Summary: hlt daemon
License: gpl
Group: DAQ
Expand Down
2 changes: 1 addition & 1 deletion scripts/metarpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ cd $TOPDIR
# we are done here, write the specs and make the fu***** rpm
cat > fffmeta.spec <<EOF
Name: $PACKAGENAME
Version: 1.6.1
Version: 1.6.2
Release: 0
Summary: hlt daemon
License: gpl
Expand Down

0 comments on commit e19ef6b

Please sign in to comment.