Skip to content

Commit

Permalink
Merge pull request #158 from PanDAWMS/dev
Browse files Browse the repository at this point in the history
Remove old harvester views and more fixes
  • Loading branch information
tkorchug authored Apr 24, 2023
2 parents 177e2de + 4db7571 commit 37f1403
Show file tree
Hide file tree
Showing 30 changed files with 949 additions and 4,383 deletions.
1 change: 1 addition & 0 deletions core/cachecontroller/mainmenurls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@
/dash/world/
/dc/sendstalledreport/
/slowtasks/
/harvester/workers/
6 changes: 3 additions & 3 deletions core/cachecontroller/schedinstances/Harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def getpayload(self):
urlsQueue = queue.PriorityQueue(-1)
harvList = self.downloadPayloadJSON(HARVESTER_LIST_URL)

if harvList is not None:
for hin in harvList:
urlsQueue.put((self.BASIC_PRIORITY, '/harvester/workers/?instance='+str(hin['instance'])))
if harvList is not None and 'instances' in harvList:
for hin in harvList['instances']:
urlsQueue.put((self.BASIC_PRIORITY, '/harvester/workers/?instance='+str(hin['harvesterid'])))

return urlsQueue

2 changes: 1 addition & 1 deletion core/cachecontroller/settingscron.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
TIMEOUT_WHEN_DB_LOADED = 5
URL_WITH_BIG_TASKS = '/tasks/?site=ORNL_Titan_MCORE&status=running&json'
URL_WITH_ES_TASKS = '/tasks/?eventservice=eventservice&json'
HARVESTER_LIST_URL = '/harvester/instances/?json'
HARVESTER_LIST_URL = '/harvester/instances/?days=7&json'
LOG_PATH = "/tmp/cachecontroller.log"
PANDA_LOGGER_PATH = "/cephfs/atlpan/filebrowser"
MAX_LOG_AGE_DAYS = 3
Expand Down
74 changes: 73 additions & 1 deletion core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
{'name': 'transformation', 'error': 'transexitcode', 'diag': None, 'title': 'Trf exit code'},
)

JOB_FIELDS_STANDARD = (
JOB_FIELDS_ATTR_SUMMARY = (
'processingtype',
'computingsite',
'jobstatus',
Expand Down Expand Up @@ -211,3 +211,75 @@
'attemptnr',
'site'
)

JOB_FIELDS = (
'corecount',
'jobsubstatus',
'produsername',
'cloud',
'computingsite',
'cpuconsumptiontime',
'jobstatus',
'transformation',
'prodsourcelabel',
'specialhandling',
'vo',
'modificationtime',
'pandaid',
'atlasrelease',
'jobsetid',
'processingtype',
'workinggroup',
'jeditaskid',
'taskid',
'currentpriority',
'creationtime',
'starttime',
'endtime',
'brokerageerrorcode',
'brokerageerrordiag',
'ddmerrorcode',
'ddmerrordiag',
'exeerrorcode',
'exeerrordiag',
'jobdispatchererrorcode',
'jobdispatchererrordiag',
'piloterrorcode',
'piloterrordiag',
'superrorcode',
'superrordiag',
'taskbuffererrorcode',
'taskbuffererrordiag',
'transexitcode',
'destinationse',
'homepackage',
'inputfileproject',
'inputfiletype',
'attemptnr',
'jobname',
'computingelement',
'proddblock',
'destinationdblock',
'reqid',
'minramcount',
'statechangetime',
'avgvmem',
'maxvmem',
'maxpss',
'maxrss',
'nucleus',
'eventservice',
'nevents',
'gshare',
'noutputdatafiles',
'parentid',
'actualcorecount',
'schedulerid',
'container_name',
'maxattempt',
'pilotid',
'jobmetrics',
'resourcetype',
'commandtopilot',
'cmtconfig'
)
4 changes: 2 additions & 2 deletions core/datacarousel/templates/DataTapeCarouselle.html
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@
{ title: 'Started at', data: 'start_time' },
{ title: 'Rucio rule', data: 'rse',
"render": function(data, type, full, meta) {
if (data) {
return '<a href="https://rucio-ui.cern.ch/rule?rule_id=' + full['rse'] + '">' + full['rse'].slice(0,3) + '...' + full['rse'].slice(full['rse'].length-3, full['rse'].length) + ' <img src="/static/images/rucio-logo.png" width=14 height=14 border=0></a>';
if (data && "{{ request.session.rucio_ui }}".length > 0) {
return '<a href="{{ request.session.rucio_ui }}rule?rule_id=' + full['rse'] + '">' + full['rse'].slice(0,3) + '...' + full['rse'].slice(full['rse'].length-3, full['rse'].length) + ' <img src="/static/images/rucio-logo.png" width=14 height=14 border=0></a>';
}
else {
return '---'
Expand Down
4 changes: 2 additions & 2 deletions core/datacarousel/templates/DataTapeCaruselTails.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@
data: "rucio_rule",
sDefaultContent: "-",
render: function(data, type, full, meta) {
if (data.length > 0) {
return '<a target="_blank" href="https://rucio-ui.cern.ch/rule?rule_id=' + data + '">' + data + '</a>'
if (data.length > 0 && "{{ request.session.rucio_ui }}".length > 0) {
return '<a target="_blank" href="{{ request.session.rucio_ui }}rule?rule_id=' + data + '">' + data + '</a>'
}
else {
return data;
Expand Down
2 changes: 1 addition & 1 deletion core/harvester/templates/harvesterWorkers.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
</table>
</div>
<div class="tabs-panel" id="panel_dialoglist">
<table id="datatableHDL" style="width: 100%" class="data-table nowrap">
<table id="datatableHDL" style="width: 100%" class="data-table">
<caption style="height: 30px;vertical-align: middle">Diagnostic messages from harvester instances</caption>
<thead><tr>
<th>Creation time</th>
Expand Down
Loading

0 comments on commit 37f1403

Please sign in to comment.