self.label, uuid)
continue
logger.debug('%s: follow %s', self.label, uuid)
- child_summarizer = ProcessSummarizer(uuid)
+ child_summarizer = NewSummarizer(uuid)
child_summarizer.stats_max = self.stats_max
child_summarizer.task_stats = self.task_stats
child_summarizer.tasks = self.tasks
self.job_tot[category][stat] += val
logger.debug('%s: done totals', self.label)
+ missing_category = {
+ 'cpu': 'CPU',
+ 'mem': 'memory',
+ 'net:': 'network I/O',
+ 'statfs': 'storage space',
+ }
+ for task_stat in self.task_stats.values():
+ for category in task_stat.keys():
+ for checkcat in missing_category:
+ if checkcat.endswith(':'):
+ if category.startswith(checkcat):
+ missing_category.pop(checkcat)
+ break
+ else:
+ if category == checkcat:
+ missing_category.pop(checkcat)
+ break
+ for catlabel in missing_category.values():
+ logger.warning('%s: %s stats are missing -- possible cluster configuration issue',
+ self.label, catlabel)
+
def long_label(self):
label = self.label
if hasattr(self, 'process') and self.process['uuid'] not in label:
constraint_key,
int(used_cores))
- # FIXME: This needs to be updated to account for current nodemanager algorithms
+ # FIXME: This needs to be updated to account for current a-d-c algorithms
def _recommend_ram(self):
"""Recommend an economical RAM constraint for this job.
class ProcessSummarizer(Summarizer):
- """Process is a job, pipeline, container, or container request."""
+ """Process is a job, pipeline, or container request."""
def __init__(self, process, label=None, **kwargs):
rdr = None
label = self.process.get('name', self.process['uuid'])
# Pre-Arvados v1.4 everything is in 'log'
# For 1.4+ containers have no logs and container_requests have them in 'log_uuid', not 'log'
- log_collection = self.process.get('log')
- if not log_collection:
- log_collection = self.process.get('log_uuid')
- if log_collection:
+ log_collection = self.process.get('log', self.process.get('log_uuid'))
+ if log_collection and self.process.get('state') != 'Uncommitted': # arvados.util.CR_UNCOMMITTED:
try:
rdr = crunchstat_summary.reader.CollectionReader(log_collection)
except arvados.errors.NotFoundError as e:
logger.warning("Trying event logs after failing to read "
"log collection %s: %s", self.process['log'], e)
if rdr is None:
- rdr = crunchstat_summary.reader.LiveLogReader(self.process['uuid'])
+ uuid = self.process.get('container_uuid', self.process.get('uuid'))
+ rdr = crunchstat_summary.reader.LiveLogReader(uuid)
label = label + ' (partial)'
super(ProcessSummarizer, self).__init__(rdr, label=label, **kwargs)
self.existing_constraints = self.process.get('runtime_constraints', {})